summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-07-05 11:25:15 -0500
committerOmar Roth <omarroth@hotmail.com>2018-07-05 11:25:15 -0500
commita01bdf6c16d91215c50a496f7e7f090abf8302ca (patch)
tree3e354d1f0219cb7612b7017fea29bbd2752c8da9 /src
parent8e24f4e9e3d12f501d90c225fcc9a7eb41877a7f (diff)
downloadinvidious-a01bdf6c16d91215c50a496f7e7f090abf8302ca.tar.gz
invidious-a01bdf6c16d91215c50a496f7e7f090abf8302ca.tar.bz2
invidious-a01bdf6c16d91215c50a496f7e7f090abf8302ca.zip
Add /user endpoint
Diffstat (limited to 'src')
-rw-r--r--src/invidious.cr5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index c0581944..fe747f79 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -938,6 +938,11 @@ get "/videoplayback*" do |env|
end
end
+get "/user/:user" do |env|
+ user = env.params.url["user"]
+ env.redirect "/channel/#{user}"
+end
+
get "/channel/:ucid" do |env|
authorized = env.get? "authorized"
if authorized