Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Merge pull request #37 from mozilla/website-abuse
Browse files Browse the repository at this point in the history
Website abuse endpoint
  • Loading branch information
mstriemer committed May 27, 2015
2 parents a0babbb + ca17740 commit 0808d98
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main.py
Expand Up @@ -289,5 +289,17 @@ def website(version=DEFAULT_API_VERSION, pk=None):
return json.load(f)


@app.route('/api/<version>/abuse/website/', methods=['POST'])
def website_issue(version=DEFAULT_API_VERSION):
if request.form.get('text') and request.form.get('website'):
return {
'text': request.form['text'],
'reporter': request.form.get('reporter'),
'website': request.form['website']
}
else:
return make_response('', 400)


if __name__ == '__main__':
app.run()

0 comments on commit 0808d98

Please sign in to comment.