From 1e543c9a91a0aaed2daba5ad7c417172bd8b501b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 27 Dec 2021 07:09:22 +0200 Subject: [PATCH] fds --- files/routes/posts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/files/routes/posts.py b/files/routes/posts.py index eccdaf8e4..c437f1bf0 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -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()