Apply suggestions from code review

This commit is contained in:
Gabriel 2024-05-03 21:41:49 -04:00 committed by GitHub
parent adcb567307
commit 83375dcdbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -4524,9 +4524,8 @@ class FastAPI(Starlette):
@app.middleware("http")
async def add_process_time_header(
request: Request,
call_next: Callable[[Request], Awaitable[Response]
) -> Response:
request: Request, call_next: Callable[[Request], Awaitable[Response]]
) -> Response:
start_time = time.time()
response = await call_next(request)
process_time = time.time() - start_time