remotes/1693045480750635534/spooky-22
parent
765b47530b
commit
90aa7e3630
|
@ -34,15 +34,7 @@ def toggle_club(pid, v):
|
||||||
post.club = not post.club
|
post.club = not post.club
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
||||||
if post.author_id!=v.id:
|
W g.db.commit()
|
||||||
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()
|
|
||||||
|
|
||||||
if post.club: return {"message": "Post has been marked as club-only!"}
|
if post.club: return {"message": "Post has been marked as club-only!"}
|
||||||
else: return {"message": "Post has been unmarked as club-only!"}
|
else: return {"message": "Post has been unmarked as club-only!"}
|
||||||
|
|
Loading…
Reference in New Issue