Fix error code for disabled popular endpoint

This commit is contained in:
Brahim Hadriche 2023-11-28 21:34:17 -05:00
parent 9ce9c54399
commit 1363fb8094

View File

@ -30,8 +30,7 @@ module Invidious::Routes::API::V1::Feeds
env.response.content_type = "application/json" env.response.content_type = "application/json"
if !CONFIG.popular_enabled if !CONFIG.popular_enabled
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json return error_json(403, "Administrator has disabled this endpoint.")
haltf env, 400, error_message
end end
JSON.build do |json| JSON.build do |json|