Rework error system a bit to remove a bunch of duplicated code (#434)

This commit is contained in:
justcool393 2022-12-01 18:58:27 -08:00 committed by GitHub
parent 08602b4279
commit 0c632d73b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 197 additions and 350 deletions

View file

@ -118,7 +118,7 @@ def is_not_permabanned(f):
check_ban_evade(v)
if v.is_suspended_permanently:
return {"error": "Forbidden: you are permabanned."}, 403
abort(403, "You are permanently banned")
return make_response(f(*args, v=v, **kwargs))