mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-22 00:00:44 -04:00
Expose version in /api/v1/stats with statistic disabled
This commit is contained in:
parent
85ba04b715
commit
dbba9d7687
2 changed files with 4 additions and 3 deletions
|
@ -4,10 +4,10 @@ module Invidious::Routes::API::V1::Misc
|
|||
env.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_json
|
||||
end
|
||||
|
||||
Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_json
|
||||
end
|
||||
|
||||
# APIv1 currently uses the same logic for both
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue