From 1363fb809436464de57b90113864ff50867a9dae Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Tue, 28 Nov 2023 21:34:17 -0500 Subject: [PATCH] Fix error code for disabled popular endpoint --- src/invidious/routes/api/v1/feeds.cr | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/invidious/routes/api/v1/feeds.cr b/src/invidious/routes/api/v1/feeds.cr index 41865f34..0ee22ca6 100644 --- a/src/invidious/routes/api/v1/feeds.cr +++ b/src/invidious/routes/api/v1/feeds.cr @@ -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|