1
This commit is contained in:
parent
9928f41f15
commit
39ab27438c
1 changed files with 1 additions and 9 deletions
|
@ -34,15 +34,7 @@ def toggle_club(pid, v):
|
|||
post.club = not post.club
|
||||
g.db.add(post)
|
||||
|
||||
if post.author_id!=v.id:
|
||||
ma=ModAction(
|
||||
kind="club" if post.club else "unclub",
|
||||
user_id=v.id,
|
||||
target_submission_id=post.id,
|
||||
)
|
||||
g.db.add(ma)
|
||||
|
||||
g.db.commit()
|
||||
W g.db.commit()
|
||||
|
||||
if post.club: return {"message": "Post has been marked as club-only!"}
|
||||
else: return {"message": "Post has been unmarked as club-only!"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue