aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-02-09 13:29:46 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-02-09 17:23:02 -0800
commit3efd39b973009d248fd399dc76b643946088dbc1 (patch)
treee327658cfcdded2a9e16f9ef2c77e50bee64e771 /python
parent1fa6c8221e320cd11a87a4a673be4f40ee167baa (diff)
downloadfatcat-3efd39b973009d248fd399dc76b643946088dbc1.tar.gz
fatcat-3efd39b973009d248fd399dc76b643946088dbc1.zip
web: editgroup and editor underscore redirect helpers
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/routes.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index a7fb34bd..186166bd 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -690,6 +690,11 @@ def editgroup_view(ident: str) -> AnyResponse:
return render_template("editgroup_view.html", editgroup=eg, auth_to=auth_to)
+@app.route("/editgroup_<string(length=26):ident>", methods=["GET"])
+def editgroup_underscore_view(ident: str) -> AnyResponse:
+ return redirect(f"/editgroup/{ident}")
+
+
@app.route("/editgroup/<string(length=26):ident>/diff", methods=["GET"])
def editgroup_diff_view(ident: str) -> AnyResponse:
try:
@@ -808,6 +813,11 @@ def editor_view(ident: str) -> AnyResponse:
return render_template("editor_view.html", editor=entity)
+@app.route("/editor_<string(length=26):ident>", methods=["GET"])
+def editor(ident: str) -> AnyResponse:
+ return redirect(f"/editor/{ident}")
+
+
@app.route("/editor/<string(length=26):ident>/editgroups", methods=["GET"])
def editor_editgroups(ident: str) -> AnyResponse:
try: