Porównaj commity

...

4 Commity

Autor SHA1 Wiadomość Data
Richard Lora b98b8dfcdd
Merge e0f20b0641 into eda7444ca4 2024-05-03 14:01:01 -04:00
Richard Lora e0f20b0641 style(feeds.cr): fix code formatting 2024-05-03 14:00:28 -04:00
Richard Lora 3abf21625c fix(search.cr): http status code 2024-05-03 10:38:57 -04:00
Richard Lora 5fa293541b
fix(feeds.cr): http status code 2024-05-03 10:36:43 -04:00
3 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -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|

Wyświetl plik

@ -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)

Wyświetl plik

@ -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"