make pretty

This commit is contained in:
706f6f7079646f6f646f6f 2021-10-08 20:20:57 +02:00
parent 435804edd1
commit 0cbcd054f3
2 changed files with 19 additions and 17 deletions

View File

@ -1,4 +1,22 @@
class Invidious::Jobs::StatisticsRefreshJob < Invidious::Jobs::BaseJob
STATISTICS_DISABLED = {
"version" => "3.0",
"software" => SOFTWARE,
"statisticsEnabled" => false,
"openRegistrations" => nil,
"usage" => {
"users" => {
"total" => nil,
"activeHalfyear" => nil,
"activeMonth" => nil,
},
},
"metadata" => {
"updatedAt" => nil,
"lastChannelRefreshedAt" => nil,
},
}
STATISTICS = {
"version" => "3.0",
"software" => SOFTWARE,

View File

@ -5,23 +5,7 @@ module Invidious::Routes::API::V1::Misc
env.response.content_type = "application/json"
if !CONFIG.statistics_enabled
return {
"version" => "3.0",
"software" => SOFTWARE,
"statisticsEnabled" => false,
"openRegistrations" => nil,
"usage" => {
"users" => {
"total" => nil,
"activeHalfyear" => nil,
"activeMonth" => nil,
},
},
"metadata" => {
"updatedAt" => nil,
"lastChannelRefreshedAt" => nil,
},
}.to_json
return Invidious::Jobs::StatisticsRefreshJob::STATISTICS_DISABLED.to_json
end
Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_json