mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-16 01:28:29 +00:00
make pretty
This commit is contained in:
parent
435804edd1
commit
0cbcd054f3
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user