mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add 'results' route redirect
This commit is contained in:
parent
a09b12a774
commit
714fd3dae3
1 changed files with 9 additions and 0 deletions
|
@ -1329,6 +1329,15 @@ get "/embed/:id" do |env|
|
|||
rendered "embed"
|
||||
end
|
||||
|
||||
get "/results" do |env|
|
||||
search_query = env.params.query["search_query"]?
|
||||
if search_query
|
||||
env.redirect "/search?q=#{URI.escape(search_query)}"
|
||||
else
|
||||
env.redirect "/"
|
||||
end
|
||||
end
|
||||
|
||||
get "/search" do |env|
|
||||
if env.params.query["q"]?
|
||||
query = env.params.query["q"]
|
||||
|
|
Loading…
Reference in a new issue