From 19e9fe8f31f990a3e7e9ff42300d3740e379361b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 3 Aug 2021 14:25:47 +0200 Subject: [PATCH] fdfd --- drama/routes/admin.py | 5 ++--- drama/templates/admin/banned_domains.html | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 27afa823e..b5b8bff2d 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -949,16 +949,15 @@ def admin_banned_domains(v): banned_domains = g.db.query(BannedDomain).all() return render_template("admin/banned_domains.html", v=v, banned_domains=banned_domains) -@app.post("/admin/ban_domain") +@app.post("/admin/toggle_ban_domain") @admin_level_required(4) @validate_formkey -def admin_ban_domain(v): +def admin_toggle_ban_domain(v): domain=request.form.get("domain").strip() if not domain: abort(400) reason=request.form.get("reason", "").strip() - if not reason: abort(400) d = g.db.query(BannedDomain).filter_by(domain=domain.replace("_","\_")).first() if d: g.db.delete(d) diff --git a/drama/templates/admin/banned_domains.html b/drama/templates/admin/banned_domains.html index 46542db90..868d8b8c7 100644 --- a/drama/templates/admin/banned_domains.html +++ b/drama/templates/admin/banned_domains.html @@ -27,7 +27,7 @@ -
+