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:
|
else:
|
||||||
flag = Flag(post_id=post.id, user_id=v.id, reason=reason)
|
flag = Flag(post_id=post.id, user_id=v.id, reason=reason)
|
||||||
g.db.add(flag)
|
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()
|
g.db.commit()
|
||||||
|
|
||||||
|
@ -62,7 +65,6 @@ def api_flag_comment(cid, v):
|
||||||
|
|
||||||
return {"message": "Comment reported!"}
|
return {"message": "Comment reported!"}
|
||||||
|
|
||||||
|
|
||||||
@app.post('/del_report/comment/<cid>/<uid>')
|
@app.post('/del_report/comment/<cid>/<uid>')
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
@admin_level_required(2)
|
@admin_level_required(2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue