From 22475fa76d22425a306593df3137045a66159548 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 14:27:56 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- integration_tests/base_routes.py | 2 +- robyn/__init__.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/integration_tests/base_routes.py b/integration_tests/base_routes.py index 8e5e2c633..37a181fb4 100644 --- a/integration_tests/base_routes.py +++ b/integration_tests/base_routes.py @@ -486,6 +486,7 @@ async def async_raise(): # ===== Main ===== + @app.view("/test_decorator_view") def decorator_view(): def get(): @@ -496,7 +497,6 @@ def post(request): return {"status_code": 200, "body": body} - if __name__ == "__main__": app.add_request_header("server", "robyn") app.add_directory( 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)