This commit is contained in:
Aevann1 2022-04-18 23:11:30 +02:00
parent 9f5e77139e
commit 96b55696e4
16 changed files with 42 additions and 20 deletions

View file

@ -38,6 +38,15 @@ def api_flag_post(pid, v):
_note=f'"{post.flair}"'
)
g.db.add(ma)
elif reason.startswith('/h/') and v.admin_level > 2:
post.sub = reason[3:]
g.db.add(post)
ma=ModAction(
kind="move_hole",
user_id=v.id,
target_submission_id=post.id,
)
g.db.add(ma)
else:
flag = Flag(post_id=post.id, user_id=v.id, reason=reason)
g.db.add(flag)