From 15a9d53ba6936d7e7f55da67bad7cb0dbc633163 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 27 Jan 2023 12:04:30 +0200 Subject: [PATCH] use get_msg() in /profile_css --- files/routes/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index f2ebb1359..011bcf072 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -604,7 +604,7 @@ def settings_images_banner(v): @limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID) @auth_required def settings_css_get(v:User): - return render_template("settings/css.html", v=v) + return render_template("settings/css.html", v=v, msg=get_msg(), profilecss=v.profilecss) @app.post("/settings/css") @limiter.limit(DEFAULT_RATELIMIT_SLOWER) @@ -629,7 +629,7 @@ def settings_profilecss(v): return render_template("settings/css.html", error=error, v=v, profilecss=profilecss) v.profilecss = profilecss g.db.add(v) - return render_template("settings/css.html", v=v, msg="Profile CSS successfully updated!", profilecss=v.profilecss) + return redirect("/settings/css?msg=Profile CSS successfully updated!") @app.get("/settings/security") @limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)