fds
This commit is contained in:
parent
141b58296c
commit
1e543c9a91
1 changed files with 1 additions and 0 deletions
|
@ -1327,6 +1327,7 @@ def api_pin_post(post_id, v):
|
||||||
|
|
||||||
post = g.db.query(Submission).filter_by(id=post_id).first()
|
post = g.db.query(Submission).filter_by(id=post_id).first()
|
||||||
if post:
|
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
|
post.is_pinned = not post.is_pinned
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue