remotes/1693045480750635534/spooky-22
Aevann1 2021-08-27 23:19:08 +02:00
parent fdfa5c3eb3
commit 2c6cbce7c6
1 changed files with 9 additions and 2 deletions

View File

@ -850,8 +850,15 @@ def api_sticky_post(post_id, v):
if post:
post.stickied = not (post.stickied)
g.db.add(post)
cache.delete_memoized(frontlist)
ma=ModAction(
kind="pin_post" if post.is_pinned else "unpin_post",
user_id=v.id,
target_post_id=post.id
)
g.db.add(ma)
cache.delete_memoized(frontlist)
return "", 204