remotes/1693045480750635534/spooky-22
Aevann1 2021-11-16 03:49:49 +02:00
parent bdac78658d
commit 12210e92d9
1 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,8 @@ def admin_vote_info_get(v):
@validate_formkey
def api_vote_post(post_id, new, v):
if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403
if new not in ["-1", "0", "1"]: abort(400)
if request.headers.get("Authorization"): abort(403)
@ -118,6 +120,8 @@ def api_vote_post(post_id, new, v):
@validate_formkey
def api_vote_comment(comment_id, new, v):
if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403
if new not in ["-1", "0", "1"]: abort(400)
if request.headers.get("Authorization"): abort(403)