This commit is contained in:
Aevann1 2021-10-20 23:06:25 +02:00
parent f8bb7a99be
commit fd655eadec
12 changed files with 105 additions and 31 deletions

View file

@ -104,6 +104,10 @@ def api_vote_post(post_id, new, v):
g.db.add(post)
g.db.commit()
except: g.db.rollback()
if post.stickied and post.stickied.startswith("t:") and int(time.time()) > int(post.stickied[2:]):
post.stickied = None
g.db.add(post)
return "", 204
@app.post("/vote/comment/<comment_id>/<new>")