diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2022-02-22 00:39:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-22 00:39:54 +0100 |
| commit | 857096ba5f8f8cb61215324651276a2fd401624e (patch) | |
| tree | e8eceee7a01e1f22ec208c8c625b2638719df362 | |
| parent | c8fbb74835d15b3b23a14466c7d60ec1aa8a8d52 (diff) | |
| parent | d0d8ba00683b61f85edf5712afb67f1e22efb72a (diff) | |
| download | invidious-857096ba5f8f8cb61215324651276a2fd401624e.tar.gz invidious-857096ba5f8f8cb61215324651276a2fd401624e.tar.bz2 invidious-857096ba5f8f8cb61215324651276a2fd401624e.zip | |
Merge pull request #2910 from MathiusD/expose-version
Expose version by default on api/v1/stats
| -rw-r--r-- | src/invidious/routes/api/v1/misc.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/routes/api/v1/misc.cr b/src/invidious/routes/api/v1/misc.cr index a1ce0cbc..844fedb8 100644 --- a/src/invidious/routes/api/v1/misc.cr +++ b/src/invidious/routes/api/v1/misc.cr @@ -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 |
