remotes/1693045480750635534/spooky-22
Aevann1 2021-12-27 07:09:22 +02:00
parent 271a8cdc41
commit d0832b7905
1 changed files with 1 additions and 0 deletions

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()