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

View File

@ -59,7 +59,7 @@ def api_v1_recipes_post():
""" """
Create a new recipe from URL 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: if 'url' not in data:
return { return {
'error': 'No URL provided' 'error': 'No URL provided'