From 36b2db7b2b8a4d5a97e9f5fbc7353295914ad307 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 27 Jul 2023 03:15:50 +0300 Subject: [PATCH] allow nsfw via the api, why the hell was that disabled --- files/routes/comments.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 262dc2bfe..caf3ed2f8 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -57,9 +57,8 @@ def post_pid_comment_cid(cid, v, pid=None, anything=None, sub=None): post = get_post(post, v=v) - if post.over_18 and not (v and v.over_18) and not session.get('over_18_cookies', 0) >= int(time.time()): - if v and v.client: abort(403, "This content is not suitable for some users and situations!") - else: return render_template("errors/nsfw.html", v=v), 403 + if not (v and v.client) and post.over_18 and not (v and v.over_18) and not session.get('over_18_cookies', 0) >= int(time.time()): + return render_template("errors/nsfw.html", v=v), 403 try: context = min(int(request.values.get("context", 8)), 8) except: context = 8