mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-30 10:42:53 +00:00
Move if CONFIG.statistics_enabled into the handler for the /metrics route
This commit is contained in:
@@ -310,13 +310,7 @@ module Invidious::Routing
|
||||
|
||||
# Misc
|
||||
get "/api/v1/stats", {{namespace}}::Misc, :stats
|
||||
if CONFIG.statistics_enabled
|
||||
get "/api/v1/metrics", {{namespace}}::Misc, :metrics
|
||||
else
|
||||
get "/api/v1/metrics" do |env|
|
||||
env.response.status_code = 204
|
||||
end
|
||||
end
|
||||
get "/api/v1/metrics", {{namespace}}::Misc, :metrics
|
||||
get "/api/v1/playlists/:plid", {{namespace}}::Misc, :get_playlist
|
||||
get "/api/v1/auth/playlists/:plid", {{namespace}}::Misc, :get_playlist
|
||||
get "/api/v1/mixes/:rdid", {{namespace}}::Misc, :mixes
|
||||
|
||||
Reference in New Issue
Block a user