Nicify JSON response of devices list

This commit is contained in:
Simon Nishi McCorkindale 2021-06-04 00:42:07 +08:00
parent 2a02adf14d
commit 0af0f5e79a

View file

@ -152,7 +152,7 @@ def serve(servername, port, id):
@app.route('/api/json/devices')
def devicesjson():
devices = str(mf_wrapper.deviceIds(True))
return Response(json.dumps(devices), content_type='application/json')
return Response('{"devices":'+devices+'}', content_type='application/json')
@app.route('/api/json/randint32')
def randjsonint32():