forked from 0x2620/pandora
body is bytes
This commit is contained in:
parent
f44584f131
commit
341e1bd892
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ def api(request):
|
||||||
response['Access-Control-Allow-Origin'] = '*'
|
response['Access-Control-Allow-Origin'] = '*'
|
||||||
return response
|
return response
|
||||||
if request.META.get('CONTENT_TYPE') == 'application/json':
|
if request.META.get('CONTENT_TYPE') == 'application/json':
|
||||||
r = json.loads(request.body)
|
r = json.loads(request.body.decode('utf-8'))
|
||||||
action = r['action']
|
action = r['action']
|
||||||
data = r.get('data', {})
|
data = r.get('data', {})
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue