(*args, handler=handler, **kwargs)
| 331 | if inspect.iscoroutinefunction(handler): |
| 332 | |
| 333 | async def _async_view_func(*args, handler=handler, **kwargs): |
| 334 | data = request.get_json() |
| 335 | result = await handler(**data) if data else await handler() |
| 336 | return jsonify(result) |
| 337 | |
| 338 | view_func = _async_view_func |
| 339 | else: |