forked from MarseyWorld/MarseyWorld
fix modactions
parent
684a8243c4
commit
86125a08f1
|
@ -127,11 +127,12 @@ def remove_report_post(v, pid, uid):
|
||||||
|
|
||||||
g.db.delete(report)
|
g.db.delete(report)
|
||||||
|
|
||||||
ma=ModAction(
|
if v.id != report.user_id:
|
||||||
kind="delete_report",
|
ma=ModAction(
|
||||||
user_id=v.id,
|
kind="delete_report",
|
||||||
target_post_id=pid
|
user_id=v.id,
|
||||||
)
|
target_post_id=pid
|
||||||
|
)
|
||||||
|
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
return {"message": "Report removed successfully!"}
|
return {"message": "Report removed successfully!"}
|
||||||
|
@ -152,11 +153,12 @@ def remove_report_comment(v, cid, uid):
|
||||||
|
|
||||||
g.db.delete(report)
|
g.db.delete(report)
|
||||||
|
|
||||||
ma=ModAction(
|
if v.id != report.user_id:
|
||||||
kind="delete_report",
|
ma=ModAction(
|
||||||
user_id=v.id,
|
kind="delete_report",
|
||||||
target_comment_id=cid
|
user_id=v.id,
|
||||||
)
|
target_comment_id=cid
|
||||||
|
)
|
||||||
|
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
return {"message": "Report removed successfully!"}
|
return {"message": "Report removed successfully!"}
|
||||||
|
|
Loading…
Reference in New Issue