mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add redirect for legacy '/profile' endpoint
This commit is contained in:
parent
30f08ae48c
commit
0fcfb7b82b
1 changed files with 10 additions and 0 deletions
|
@ -2142,6 +2142,16 @@ get "/c/:user" do |env|
|
|||
env.redirect anchor["href"]
|
||||
end
|
||||
|
||||
# Legacy endpoint for /user/:username
|
||||
get "/profile" do |env|
|
||||
user = env.params.query["user"]?
|
||||
if !user
|
||||
env.redirect "/"
|
||||
else
|
||||
env.redirect "/user/#{user}"
|
||||
end
|
||||
end
|
||||
|
||||
get "/user/:user" do |env|
|
||||
user = env.params.url["user"]
|
||||
env.redirect "/channel/#{user}"
|
||||
|
|
Loading…
Reference in a new issue