Пример #1
0
 def wrapper(*args: Any, **kwargs: Any) -> Any:
     resp = fun(*args, **kwargs)
     if isinstance(resp, Response):  # There may be a better way to test
         return resp
     data, code, headers = flask_response_unpack(resp)
     return flask_restful_api.make_response(data, code, headers=headers)
Пример #2
0
 def wrapper(*args: Any, **kwargs: Any) -> Any:
     resp = fun(*args, **kwargs)
     if isinstance(resp, Response):  # There may be a better way to test
         return resp
     data, code, headers = flask_response_unpack(resp)
     return flask_restful_api.make_response(data, code, headers=headers)