diff --git a/drama/routes/admin.py b/drama/routes/admin.py index e8e763f25..a7bdae0a5 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -459,20 +459,6 @@ def admin_appdata(v): v=v) -@app.get("/admin/banned_domains/") -@admin_level_required(4) -def admin_domain_domain(v): - - domains = g.db.query(BannedDomain).all() - - return render_template( - "admin/banned_domains.html", - v=v, - domains=domains, - reasons=REASONS - ) - - @app.post("/admin/image_purge") @admin_level_required(5) def admin_image_purge(v): @@ -957,13 +943,26 @@ def admin_dump_cache(v): return {"message": "Internal cache cleared."} +@app.get("/admin/banned_domains/") +@admin_level_required(4) +def admin_banned_domains(v): + + domains = g.db.query(BannedDomain).all() + + return render_template( + "admin/banned_domains.html", + v=v, + domains=domains, + reasons=REASONS + ) + + @app.post("/admin/ban_domain") @admin_level_required(4) @validate_formkey def admin_ban_domain(v): domain=request.form.get("domain",'').strip() - if not domain: abort(400) reason=int(request.form.get("reason",0)) diff --git a/drama/templates/admin/banned_domains.html b/drama/templates/admin/banned_domains.html index faa916032..2c7f33428 100644 --- a/drama/templates/admin/banned_domains.html +++ b/drama/templates/admin/banned_domains.html @@ -26,8 +26,7 @@
- - +