mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-17 10:08:30 +00:00
make pretty
This commit is contained in:
parent
435804edd1
commit
0cbcd054f3
@ -1,4 +1,22 @@
|
|||||||
class Invidious::Jobs::StatisticsRefreshJob < Invidious::Jobs::BaseJob
|
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 = {
|
STATISTICS = {
|
||||||
"version" => "3.0",
|
"version" => "3.0",
|
||||||
"software" => SOFTWARE,
|
"software" => SOFTWARE,
|
||||||
|
@ -5,23 +5,7 @@ module Invidious::Routes::API::V1::Misc
|
|||||||
env.response.content_type = "application/json"
|
env.response.content_type = "application/json"
|
||||||
|
|
||||||
if !CONFIG.statistics_enabled
|
if !CONFIG.statistics_enabled
|
||||||
return {
|
return Invidious::Jobs::StatisticsRefreshJob::STATISTICS_DISABLED.to_json
|
||||||
"version" => "3.0",
|
|
||||||
"software" => SOFTWARE,
|
|
||||||
"statisticsEnabled" => false,
|
|
||||||
"openRegistrations" => nil,
|
|
||||||
"usage" => {
|
|
||||||
"users" => {
|
|
||||||
"total" => nil,
|
|
||||||
"activeHalfyear" => nil,
|
|
||||||
"activeMonth" => nil,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"metadata" => {
|
|
||||||
"updatedAt" => nil,
|
|
||||||
"lastChannelRefreshedAt" => nil,
|
|
||||||
},
|
|
||||||
}.to_json
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_json
|
Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_json
|
||||||
|
Loading…
Reference in New Issue
Block a user