From 100d7bc66919ec402c0e521da4861e049950cb54 Mon Sep 17 00:00:00 2001 From: girst Date: Sat, 19 Sep 2020 15:49:09 +0200 Subject: [PATCH] redirect /c/ to /channel/ --- app/dangerous/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/dangerous/__init__.py b/app/dangerous/__init__.py index 0c20441..8c69af8 100644 --- a/app/dangerous/__init__.py +++ b/app/dangerous/__init__.py @@ -96,6 +96,11 @@ def channel_redirect(user, subpage=None): """ The browse_ajax 'API' needs the UCID. We can get that from the RSS feeds. """ + + # inverse of the test in /channel/: + if re.match(r"(UC[A-Za-z0-9_-]{22})", user): + return redirect(url_for('.channel', channel_id=user)) + xmlfeed = fetch_xml("user", user) if not xmlfeed: raise NotFound("channel appears to not exist") -- 2.39.3