This commit is contained in:
Aevann1 2021-12-27 07:09:22 +02:00
parent 141b58296c
commit 1e543c9a91

View file

@ -1327,6 +1327,7 @@ def api_pin_post(post_id, v):
post = g.db.query(Submission).filter_by(id=post_id).first()
if post:
if v.id != post.author_id: return {"error": "Only the post author's can do that!"}
post.is_pinned = not post.is_pinned
g.db.add(post)
g.db.commit()