Simplify resolveUrl api call

Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
ChunkyProgrammer
2023-07-27 19:14:34 -04:00
parent e3c365f3d6
commit 734f1b7764
4 changed files with 12 additions and 13 deletions

View File

@@ -161,7 +161,7 @@ module Invidious::Routes::Channels
# redirect to post page
if lb = env.params.query["lb"]?
env.redirect "/post/#{lb}?ucid=#{ucid}"
env.redirect "/post/#{URI.encode_www_form(lb)}?ucid=#{URI.encode_www_form(ucid)}"
end
thin_mode = env.params.query["thin_mode"]? || env.get("preferences").as(Preferences).thin_mode