forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-12-12 19:45:59 +02:00
parent c1ef3f127f
commit 876933afe1
1 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ 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 v.is_banned and not v.unban_utc or new == "-1" and environ.get('DISABLE_DOWNVOTES') == '1': return {"error": "forbidden."}, 403
if new not in ["-1", "0", "1"]: abort(400)
@ -132,7 +132,7 @@ 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 v.is_banned and not v.unban_utc or new == "-1" and environ.get('DISABLE_DOWNVOTES') == '1': return {"error": "forbidden."}, 403
if new not in ["-1", "0", "1"]: abort(400)