Fix Ameba error

This commit is contained in:
ChunkyProgrammer 2024-08-24 18:05:35 -04:00
parent 767d40d0ff
commit f530817663
2 changed files with 5 additions and 5 deletions

View File

@ -67,13 +67,13 @@ module Invidious::Routes::API::V1::Search
env.response.content_type = "application/json" env.response.content_type = "application/json"
begin begin
hashtagPage = Invidious::Hashtag.fetch(hashtag, page, region) hashtag_page = Invidious::Hashtag.fetch(hashtag, page, region)
rescue ex rescue ex
return error_json(400, ex) return error_json(400, ex)
end end
JSON.build do |json| JSON.build do |json|
hashtagPage.to_json(locale, json) hashtag_page.to_json(locale, json)
end end
end end
end end

View File

@ -101,8 +101,8 @@ module Invidious::Routes::Search
end end
begin begin
hashtagPage = Invidious::Hashtag.fetch(hashtag, page) hashtag_page = Invidious::Hashtag.fetch(hashtag, page)
items = hashtagPage.videos items = hashtag_page.videos
rescue ex rescue ex
return error_template(500, ex) return error_template(500, ex)
end end
@ -112,7 +112,7 @@ module Invidious::Routes::Search
page_nav_html = Frontend::Pagination.nav_numeric(locale, page_nav_html = Frontend::Pagination.nav_numeric(locale,
base_url: "/hashtag/#{hashtag_encoded}", base_url: "/hashtag/#{hashtag_encoded}",
current_page: page, current_page: page,
show_next: hashtagPage.has_next_continuation show_next: hashtag_page.has_next_continuation
) )
templated "hashtag" templated "hashtag"