From fb82a77ed4093a5122e979395166a31256cd20f3 Mon Sep 17 00:00:00 2001 From: retoor Date: Thu, 5 Dec 2024 19:21:22 +0100 Subject: [PATCH] Update middlewares. --- src/app/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/app.py b/src/app/app.py index c345861..83f1b60 100644 --- a/src/app/app.py +++ b/src/app/app.py @@ -73,10 +73,10 @@ class BaseApplication(web.Application): return await handler(request) @web.middleware - async def request_middleware(self, request, handler): + async def request_middleware(self, request:web.Request, handler): time_start = time.time() created = get_timestamp() - request = await handler(request) + response = await handler(request) time_end = time.time() await self.insert( "http_access", @@ -86,7 +86,7 @@ class BaseApplication(web.Application): "duration": time_end - time_start, }, ) - return request + return response @web.middleware async def session_middleware(self, request, handler):