From a44ffb8f4a3cc518a348010fad626b5cd5505d40 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 4 Oct 2023 15:20:55 +0300 Subject: [PATCH] when making a hole, redirect to it --- files/routes/subs.py | 2 +- files/templates/sub/create_hole.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/subs.py b/files/routes/subs.py index 87e8d0a60..29d147c87 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -390,7 +390,7 @@ def create_sub2(v): for admin in admins: send_repeatable_notification(admin, f":!marseyparty: /h/{sub} has been created by @{v.username} :marseyparty:") - return {"message": f"/h/{sub} created successfully!"} + return redirect(f"/h/{sub}") @app.post("/kick/") @limiter.limit('1/second', scope=rpath) diff --git a/files/templates/sub/create_hole.html b/files/templates/sub/create_hole.html index 28262a076..d819b21f4 100644 --- a/files/templates/sub/create_hole.html +++ b/files/templates/sub/create_hole.html @@ -1,7 +1,7 @@ {% extends "default.html" %} {% block pagetitle %}Create a {{HOLE_NAME}}{% endblock %} {% block content %} -
+