Update middlewares.
All checks were successful
Build Base Application / Build (push) Successful in 1m36s

This commit is contained in:
retoor 2024-12-05 19:21:22 +01:00
parent 52ed6a88ec
commit fb82a77ed4

View File

@ -73,10 +73,10 @@ class BaseApplication(web.Application):
return await handler(request) return await handler(request)
@web.middleware @web.middleware
async def request_middleware(self, request, handler): async def request_middleware(self, request:web.Request, handler):
time_start = time.time() time_start = time.time()
created = get_timestamp() created = get_timestamp()
request = await handler(request) response = await handler(request)
time_end = time.time() time_end = time.time()
await self.insert( await self.insert(
"http_access", "http_access",
@ -86,7 +86,7 @@ class BaseApplication(web.Application):
"duration": time_end - time_start, "duration": time_end - time_start,
}, },
) )
return request return response
@web.middleware @web.middleware
async def session_middleware(self, request, handler): async def session_middleware(self, request, handler):