Rework error system a bit to remove a bunch of duplicated code (#434)
This commit is contained in:
parent
08602b4279
commit
0c632d73b7
28 changed files with 197 additions and 350 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue