1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

management api: make json responses nicely formatted

Better while debugging.
This commit is contained in:
Joshua Tauberer 2015-05-03 12:53:09 +00:00
parent 542877ee46
commit f01189631a

View File

@ -80,7 +80,7 @@ def unauthorized(error):
return auth_service.make_unauthorized_response()
def json_response(data):
return Response(json.dumps(data), status=200, mimetype='application/json')
return Response(json.dumps(data, indent=2, sort_keys=True)+'\n', status=200, mimetype='application/json')
###################################