Invidious is an alternative front-end to YouTube
Expose version in /api/v1/stats with statistic disabled
Féry Mathieu (Mathius)dbba9d76872a
diff --git a/docker-compose.yml b/docker-compose.ymlindex c76c314c..1c853a08 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -34,6 +34,7 @@ services:dbname: invidiousfull_refresh: falsehttps_only: false+ statistics_enabled: falsedomain:healthcheck:test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1diff --git a/src/invidious/routes/api/v1/misc.cr b/src/invidious/routes/api/v1/misc.crindex a1ce0cbc..844fedb8 100644--- a/src/invidious/routes/api/v1/misc.cr+++ b/src/invidious/routes/api/v1/misc.cr@@ -4,10 +4,10 @@ module Invidious::Routes::API::V1::Miscenv.response.content_type = "application/json"if !CONFIG.statistics_enabled- return error_json(400, "Statistics are not enabled.")+ return {"software" => SOFTWARE}.to_json+ else+ return Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_jsonend-- Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_jsonend# APIv1 currently uses the same logic for both