From 2a95c25675e5ab4755db81e65ab25aba7b0cc40c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 12 Jul 2022 21:23:37 +0200 Subject: [PATCH] allow @bbbb to vote --- files/helpers/const.py | 2 ++ files/routes/votes.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 7e3bfcd51..de7ceddb8 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -161,6 +161,7 @@ SNAPPY_ID = 2 LONGPOSTBOT_ID = 3 ZOZBOT_ID = 4 BASEDBOT_ID = 0 +BBBB_ID = 0 SCHIZO_ID = 0 A_ID = 0 @@ -202,6 +203,7 @@ if SITE in {'rdrama.net', 'devrama.xyz', 'deuxrama.net'}: SNAPPY_ID = 261 LONGPOSTBOT_ID = 1832 ZOZBOT_ID = 1833 + BBBB_ID = 12125 SCHIZO_ID = 8494 A_ID = 1230 diff --git a/files/routes/votes.py b/files/routes/votes.py index 5c6f12c12..18de8a27a 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -67,7 +67,7 @@ def api_vote_post(post_id, new, v): if new not in ["-1", "0", "1"]: abort(400) - if request.headers.get("Authorization"): abort(403) + if request.headers.get("Authorization") and v.id != BBBB_ID: abort(403) new = int(new) @@ -137,7 +137,7 @@ def api_vote_comment(comment_id, new, v): if new not in ["-1", "0", "1"]: abort(400) - if request.headers.get("Authorization"): abort(403) + if request.headers.get("Authorization") and v.id != BBBB_ID: abort(403) new = int(new)