Fix incorrect parsing of JSON request
This commit is contained in:
parent
96e23b809d
commit
9aa4756887
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user