diff --git a/integration_tests/base_routes.py b/integration_tests/base_routes.py index 5aa5d11e9..d426875d0 100644 --- a/integration_tests/base_routes.py +++ b/integration_tests/base_routes.py @@ -486,6 +486,7 @@ async def async_raise(): # ===== Views ===== + @app.view("/sync_decorator_view") def sync_decorator_view(): def get(): @@ -505,6 +506,7 @@ async def post(request): body = bytearray(request["body"]).decode("utf-8") return {"status_code": 200, "body": body} + # ===== Main ===== diff --git a/robyn/__init__.py b/robyn/__init__.py index 84a54125a..c915e12a8 100644 --- a/robyn/__init__.py +++ b/robyn/__init__.py @@ -194,6 +194,7 @@ def view(self, endpoint: str, const: bool = False): :param endpoint str: endpoint to server the route """ + def inner(handler): return self.add_view(endpoint, handler, const)