mirror of
https://github.com/iv-org/invidious.git
synced 2025-01-10 19:40:35 +05:30
fix(feeds.cr): http status code
This commit is contained in:
parent
e613e3c08c
commit
5fa293541b
@ -6,7 +6,7 @@ module Invidious::Routes::API::V1::Feeds
|
|||||||
|
|
||||||
if !CONFIG.trending_enabled
|
if !CONFIG.trending_enabled
|
||||||
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
|
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
|
||||||
haltf env, 400, error_message
|
haltf env, 403, error_message
|
||||||
end
|
end
|
||||||
|
|
||||||
region = env.params.query["region"]?
|
region = env.params.query["region"]?
|
||||||
@ -36,7 +36,7 @@ module Invidious::Routes::API::V1::Feeds
|
|||||||
|
|
||||||
if !CONFIG.popular_enabled
|
if !CONFIG.popular_enabled
|
||||||
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
|
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
|
||||||
haltf env, 400, error_message
|
haltf env, 403, error_message
|
||||||
end
|
end
|
||||||
|
|
||||||
JSON.build do |json|
|
JSON.build do |json|
|
||||||
|
Loading…
Reference in New Issue
Block a user