refactor: inject api prefix into router startup

This commit is contained in:
jxxghp
2026-08-23 00:54:01 +08:00
parent 4e895c6c67
commit f26bde2250
4 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ def build_lifecycle_components(app: FastAPI) -> tuple[LifecycleComponent, ...]:
LifecycleComponent(
name="路由",
dependencies=("数据库连接预算",),
start=lambda: init_routers(app),
start=lambda: init_routers(app, settings.API_V1_STR),
start_order=60,
start_timeout_seconds=30,
),