Set reported status when reported and not ignored
This commit is contained in:
parent
4b6aa40960
commit
16cc7ae6f6
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,9 @@ def api_flag_post(pid, v):
|
|||
else:
|
||||
flag = Flag(post_id=post.id, user_id=v.id, reason=reason)
|
||||
g.db.add(flag)
|
||||
g.db.query(Submission) \
|
||||
.where(Submission.id == post.id, Submission.filter_state != 'ignored') \
|
||||
.update({Submission.filter_state: 'reported'})
|
||||
|
||||
g.db.commit()
|
||||
|
||||
|
@ -62,7 +65,6 @@ def api_flag_comment(cid, v):
|
|||
|
||||
return {"message": "Comment reported!"}
|
||||
|
||||
|
||||
@app.post('/del_report/comment/<cid>/<uid>')
|
||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@admin_level_required(2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue