diff --git a/files/routes/admin.py b/files/routes/admin.py index 634e054a7..10ea73895 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1318,10 +1318,7 @@ def unsticky_comment(cid, v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(2) def remove_comment(c_id, v): - comment = get_comment(c_id) - if not comment: - abort(404) comment.is_banned = True comment.is_approved = None diff --git a/files/routes/subs.py b/files/routes/subs.py index 56fd7f7b2..516ee789f 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -48,9 +48,6 @@ def exile_post(v, pid): @is_not_permabanned def exile_comment(v, cid): if v.shadowbanned: return {"error": "Internal Server Error"}, 500 - try: cid = int(cid) - except: abort(400) - c = get_comment(cid) sub = c.post.sub if not sub: abort(400) diff --git a/files/routes/votes.py b/files/routes/votes.py index 513f3572f..caba2ee9c 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -133,10 +133,6 @@ def vote_comment(comment_id, new, v): if request.headers.get("Authorization") and v.id != BBBB_ID: abort(403) new = int(new) - - try: comment_id = int(comment_id) - except: abort(404) - comment = get_comment(comment_id) coin_delta = 1