Skip to content

Commit 857096b

Browse files
authored
Merge pull request #2910 from MathiusD/expose-version
Expose version by default on api/v1/stats
2 parents c8fbb74 + d0d8ba0 commit 857096b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/invidious/routes/api/v1/misc.cr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ module Invidious::Routes::API::V1::Misc
44
env.response.content_type = "application/json"
55

66
if !CONFIG.statistics_enabled
7-
return error_json(400, "Statistics are not enabled.")
7+
return {"software" => SOFTWARE}.to_json
8+
else
9+
return Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_json
810
end
9-
10-
Invidious::Jobs::StatisticsRefreshJob::STATISTICS.to_json
1111
end
1212

1313
# APIv1 currently uses the same logic for both

0 commit comments

Comments
 (0)