Skip to content

Commit

Permalink
Fix Ameba error
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer committed Nov 17, 2024
1 parent 767d40d commit f530817
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/invidious/routes/api/v1/search.cr
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ module Invidious::Routes::API::V1::Search
env.response.content_type = "application/json"

begin
hashtagPage = Invidious::Hashtag.fetch(hashtag, page, region)
hashtag_page = Invidious::Hashtag.fetch(hashtag, page, region)
rescue ex
return error_json(400, ex)
end

JSON.build do |json|
hashtagPage.to_json(locale, json)
hashtag_page.to_json(locale, json)
end
end
end
6 changes: 3 additions & 3 deletions src/invidious/routes/search.cr
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ module Invidious::Routes::Search
end

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

templated "hashtag"
Expand Down

0 comments on commit f530817

Please sign in to comment.