summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r--python/fatcat_web/routes.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 41027710..e9741b6d 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -606,6 +606,14 @@ def editor_annotations(ident):
return render_template('editor_annotations.html', editor=editor,
annotations=annotations)
+@app.route('/u/<string:username>', methods=['GET', 'HEAD'])
+def editor_username_redirect(username):
+ try:
+ editor = api.lookup_editor(username=username)
+ except ApiException as ae:
+ abort(ae.status)
+ return redirect(f'/editor/{editor.editor_id}')
+
@app.route('/changelog', methods=['GET'])
def changelog_view():
try: