mirror of https://github.com/iv-org/invidious.git
Compare commits
4 Commits
c4af60b0a6
...
b98b8dfcdd
Author | SHA1 | Date |
---|---|---|
Richard Lora | b98b8dfcdd | |
Richard Lora | e0f20b0641 | |
Richard Lora | 3abf21625c | |
Richard Lora | 5fa293541b |
|
@ -6,7 +6,7 @@ module Invidious::Routes::API::V1::Feeds
|
|||
|
||||
if !CONFIG.trending_enabled
|
||||
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
|
||||
haltf env, 400, error_message
|
||||
haltf env, 403, error_message
|
||||
end
|
||||
|
||||
region = env.params.query["region"]?
|
||||
|
@ -36,7 +36,7 @@ module Invidious::Routes::API::V1::Feeds
|
|||
|
||||
if !CONFIG.popular_enabled
|
||||
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
|
||||
haltf env, 400, error_message
|
||||
haltf env, 403, error_message
|
||||
end
|
||||
|
||||
JSON.build do |json|
|
||||
|
|
|
@ -7,7 +7,7 @@ module Invidious::Routes::API::V1::Search
|
|||
|
||||
if !CONFIG.search_enabled
|
||||
error_message = {"error" => "Administrator has disabled this endpoint."}.to_json
|
||||
haltf env, 400, error_message
|
||||
haltf env, 403, error_message
|
||||
end
|
||||
|
||||
query = Invidious::Search::Query.new(env.params.query, :regular, region)
|
||||
|
|
|
@ -44,7 +44,7 @@ module Invidious::Routes::Feeds
|
|||
|
||||
def self.trending(env)
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
|
||||
|
||||
if CONFIG.trending_enabled
|
||||
trending_type = env.params.query["type"]?
|
||||
trending_type ||= "Default"
|
||||
|
|
Loading…
Reference in New Issue