Browse Source

server: fix return_json method return values

merge-requests/1/head
Drew Short 7 years ago
parent
commit
e9dd55a35f
  1. 3
      server/atheneum/api.py

3
server/atheneum/api.py

@ -30,8 +30,7 @@ def return_json(func: Callable) -> Callable:
if isinstance(result, Response): if isinstance(result, Response):
return result return result
if isinstance(result, APIMessage): if isinstance(result, APIMessage):
response = jsonify(result.payload)
response.status = result.status
return jsonify(result.payload), result.status
return jsonify(result) return jsonify(result)
return decorate return decorate

Loading…
Cancel
Save