From b2d66b89736a55c67d6bee6752101bc837d0e94b Mon Sep 17 00:00:00 2001 From: InfinityPacer <160988576+InfinityPacer@users.noreply.github.com> Date: Tue, 22 Oct 2024 02:02:21 +0800 Subject: [PATCH] fix(auth): make login_access_token synchronous to prevent blocking --- app/api/endpoints/login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/endpoints/login.py b/app/api/endpoints/login.py index 939a4c09..ac4d7061 100644 --- a/app/api/endpoints/login.py +++ b/app/api/endpoints/login.py @@ -16,7 +16,7 @@ router = APIRouter() @router.post("/access-token", summary="获取token", response_model=schemas.Token) -async def login_access_token( +def login_access_token( form_data: OAuth2PasswordRequestForm = Depends(), otp_password: str = Form(None) ) -> Any: