From c9b00a4f2ea49b15ca3083dab58cf1c5d42ceda5 Mon Sep 17 00:00:00 2001 From: qiangyanwen <508737091@qq.com> Date: Tue, 6 Dec 2022 11:21:15 +0800 Subject: [PATCH] add test --- utils/jwt_token.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/jwt_token.py b/utils/jwt_token.py index 3fb92ed..9974542 100644 --- a/utils/jwt_token.py +++ b/utils/jwt_token.py @@ -35,10 +35,10 @@ def create_token(data: dict, expire_time): return token -oauth_scame = OAuth2PasswordBearer(tokenUrl="/api/login") +auth = OAuth2PasswordBearer(tokenUrl="/api/login") -def parse_token(token: str = Depends(oauth_scame)): +def parse_token(token: str = Depends(auth)): token_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="token不正确或已过期",