fdfd
This commit is contained in:
parent
5017c0cf5a
commit
ae0177a5ae
1 changed files with 9 additions and 2 deletions
|
@ -851,6 +851,13 @@ def api_sticky_post(post_id, v):
|
||||||
post.stickied = not (post.stickied)
|
post.stickied = not (post.stickied)
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
||||||
|
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)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
||||||
return "", 204
|
return "", 204
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue