commit before rendering

master
Aevann1 2022-09-22 22:20:29 +02:00
parent 95eea24363
commit c12f7a5f9a
2 changed files with 2 additions and 1 deletions

View File

@ -700,7 +700,7 @@ def edit_comment(cid, v):
n = Notification(comment_id=c.id, user_id=x)
g.db.add(n)
g.db.commit()
return {"comment": c.realbody(v)}

View File

@ -1058,6 +1058,7 @@ def submit_post(v, sub=None):
if not post.private and SITE == 'watchpeopledie.co':
send_wpd_message(post.permalink)
g.db.commit()
if request.headers.get("Authorization"): return post.json
else:
post.voted = 1