Merge pull request #8589 from edx/gprice/discussion-api-abuse-flagged

Add abuse flagging to discussion API
This commit is contained in:
Christopher Lee
2015-06-23 18:08:58 -04:00
8 changed files with 142 additions and 19 deletions

View File

@@ -389,6 +389,11 @@ def _do_extra_actions(api_content, cc_content, request_fields, actions_form, con
context["cc_requester"].follow(cc_content)
else:
context["cc_requester"].unfollow(cc_content)
elif field == "abuse_flagged":
if form_value:
cc_content.flagAbuse(context["cc_requester"], cc_content)
else:
cc_content.unFlagAbuse(context["cc_requester"], cc_content, removeAll=False)
else:
assert field == "voted"
if form_value: