From a01bdf6c16d91215c50a496f7e7f090abf8302ca Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 5 Jul 2018 11:25:15 -0500 Subject: [PATCH] Add /user endpoint --- src/invidious.cr | 5 +++++ 1 file changed, 5 insertions(+) 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