Skip to content

Commit

Permalink
Fix error code for disabled popular endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha committed Nov 29, 2023
1 parent 9ce9c54 commit 1363fb8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/invidious/routes/api/v1/feeds.cr
Expand Up @@ -30,8 +30,7 @@ module Invidious::Routes::API::V1::Feeds
env.response.content_type = "application/json"

if !CONFIG.popular_enabled
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
haltf env, 400, error_message
return error_json(403, "Administrator has disabled this endpoint.")
end

JSON.build do |json|
Expand Down

0 comments on commit 1363fb8

Please sign in to comment.