From d4de42fb46b07e6288fdb9ad3049981932a9f5af Mon Sep 17 00:00:00 2001 From: Wu Clan Date: Fri, 26 Sep 2025 12:03:27 +0800 Subject: [PATCH] Add the refresh token to demo mode exclusion (#834) --- backend/app/admin/api/v1/auth/auth.py | 2 +- backend/core/conf.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 定位配置