From 3b49535c4a4fd25c223e969c46693e3164af3daa Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 7 Nov 2022 08:26:41 +0200 Subject: [PATCH] make 3 more buttons instant --- files/routes/admin.py | 6 +++--- files/templates/userpage_admintools.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 9a150beae..3f0105549 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -924,7 +924,7 @@ def admin_title_change(user_id, v): ) g.db.add(ma) - return redirect(user.url) + return {"message": f"@{user.username}'s flair has been changed!"} @app.post("/ban_user/") @limiter.limit("1/second;30/minute;200/hour;1000/day") @@ -1480,7 +1480,7 @@ def admin_nuke_user(v): ) g.db.add(ma) - return redirect(user.url) + return {"message": f"@{user.username}'s content has been removed!"} @app.post("/admin/unnuke_user") @@ -1515,4 +1515,4 @@ def admin_nunuke_user(v): ) g.db.add(ma) - return redirect(user.url) + return {"message": f"@{user.username}'s content has been approved!"} diff --git a/files/templates/userpage_admintools.html b/files/templates/userpage_admintools.html index 6c493b7b4..b1fe3958b 100644 --- a/files/templates/userpage_admintools.html +++ b/files/templates/userpage_admintools.html @@ -26,7 +26,7 @@ {% if v.admin_level >= PERMS['USER_TITLE_CHANGE'] %}
-
+
@@ -96,12 +96,12 @@ {% endif %} {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} - + -
+