|
@ -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 |
|
|