File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 6969 ` ` `
7070
71713. 等待命令自动完成
72- 4. 浏览器访问:http://127.0.0.1:8000/api/v1/ docs
72+ 4. 浏览器访问:http://127.0.0.1:8000/docs
7373
7474# # 赞助
7575
Original file line number Diff line number Diff line change 44
55from backend .app .admin .api .v1 .auth import router as auth_router
66from backend .app .admin .api .v1 .user import router as user_router
7+ from backend .core .conf import settings
78
8- v1 = APIRouter ()
9+ v1 = APIRouter (prefix = settings . FASTAPI_API_V1_PATH )
910
1011v1 .include_router (auth_router )
1112v1 .include_router (user_router , prefix = '/users' , tags = ['用户' ])
Original file line number Diff line number Diff line change 33from fastapi import APIRouter
44
55from backend .app .admin .api .router import v1 as admin_v1
6- from backend .core .conf import settings
76
87route = APIRouter ()
98
10- route .include_router (admin_v1 , prefix = settings . FASTAPI_API_V1_PATH )
9+ route .include_router (admin_v1 )
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ class Settings(BaseSettings):
3535 FASTAPI_TITLE : str = 'FastAPI'
3636 FASTAPI_VERSION : str = '0.0.1'
3737 FASTAPI_DESCRIPTION : str = 'FastAPI Best Architecture'
38- FASTAPI_DOCS_URL : str | None = f '/docs'
39- FASTAPI_REDOCS_URL : str | None = f '/redocs'
40- FASTAPI_OPENAPI_URL : str | None = f '/openapi'
38+ FASTAPI_DOCS_URL : str | None = '/docs'
39+ FASTAPI_REDOCS_URL : str | None = '/redocs'
40+ FASTAPI_OPENAPI_URL : str | None = '/openapi'
4141 FASTAPI_STATIC_FILES : bool = False
4242
4343 @model_validator (mode = 'before' )
You can’t perform that action at this time.
0 commit comments