From a33e330d251da96c8bf9302e7aed14afb4fb4f7e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 31 Jul 2021 07:34:40 +0200 Subject: [PATCH] fdfd --- drama/routes/comments.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drama/routes/comments.py b/drama/routes/comments.py index 83bf2d3fd..70caaed99 100644 --- a/drama/routes/comments.py +++ b/drama/routes/comments.py @@ -340,7 +340,6 @@ def api_comment(v): if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400 - name = f'comment/{c.id}/{secrets.token_urlsafe(8)}' url = upload_file(file) body = request.form.get("body") + f"\n![]({url})" @@ -574,7 +573,7 @@ def api_comment(v): v.comment_count = v.comments.filter(Comment.parent_submission != None).filter_by(is_banned=False, deleted_utc=0).count() g.db.add(v) - if request.headers.get("Authorization"): return c.json + if request.headers.get("Authorization"): return "sex" else: return render_template("comments.html", v=v, comments=[c], render_replies=False)