Fix incorrect parsing of JSON request

This commit is contained in:
Lucas Verney 2018-03-02 20:45:37 +01:00
parent 96e23b809d
commit 9aa4756887
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ def api_v1_recipes_post():
"""
Create a new recipe from URL
"""
data = json.load(bottle.request.body)
data = json.loads(bottle.request.body.read().decode('utf-8'))
if 'url' not in data:
return {
'error': 'No URL provided'