File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/invidious/routes/api/v1 Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ services:
3434 dbname: invidious
3535 full_refresh: false
3636 https_only: false
37+ statistics_enabled: false
3738 domain:
3839 healthcheck :
3940 test : wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ module Invidious::Routes::API::V1::Misc
44 env.response.content_type = " application/json"
55
66 if ! CONFIG .statistics_enabled
7- return error_json(400 , " Statistics are not enabled." )
7+ return {" software" => SOFTWARE }.to_json
8+ else
9+ return Invidious ::Jobs ::StatisticsRefreshJob ::STATISTICS .to_json
810 end
9-
10- Invidious ::Jobs ::StatisticsRefreshJob ::STATISTICS .to_json
1111 end
1212
1313 # APIv1 currently uses the same logic for both
You can’t perform that action at this time.
0 commit comments