diff --git a/backend/app/admin/api/v1/auth/auth.py b/backend/app/admin/api/v1/auth/auth.py index eb473085..e574fe04 100644 --- a/backend/app/admin/api/v1/auth/auth.py +++ b/backend/app/admin/api/v1/auth/auth.py @@ -41,7 +41,7 @@ async def get_codes(request: Request) -> ResponseSchemaModel[list[str]]: return response_base.success(data=codes) -@router.post('/tokens', summary='刷新 token') +@router.post('/refresh', summary='刷新 token') async def refresh_token(request: Request) -> ResponseSchemaModel[GetNewToken]: data = await auth_service.refresh_token(request=request) return response_base.success(data=data) diff --git a/backend/core/conf.py b/backend/core/conf.py index c58773fd..db68ccef 100644 --- a/backend/core/conf.py +++ b/backend/core/conf.py @@ -136,6 +136,7 @@ class Settings(BaseSettings): ('POST', f'{FASTAPI_API_V1_PATH}/auth/login'), ('POST', f'{FASTAPI_API_V1_PATH}/auth/logout'), ('GET', f'{FASTAPI_API_V1_PATH}/auth/captcha'), + ('POST', f'{FASTAPI_API_V1_PATH}/auth/refresh'), } # IP 定位配置