39 lines
701 B
Python
39 lines
701 B
Python
|
|
"""统一挂载 /api,子路由保留原有路径与注册顺序。"""
|
|||
|
|
|
|||
|
|
from fastapi import APIRouter
|
|||
|
|
from app.api.routes import (
|
|||
|
|
editors,
|
|||
|
|
folders,
|
|||
|
|
auth,
|
|||
|
|
assets,
|
|||
|
|
shared_assets,
|
|||
|
|
jobs,
|
|||
|
|
events,
|
|||
|
|
submissions,
|
|||
|
|
tokens,
|
|||
|
|
workflows,
|
|||
|
|
batches,
|
|||
|
|
system,
|
|||
|
|
stories,
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
router = APIRouter()
|
|||
|
|
for child in (
|
|||
|
|
editors.router,
|
|||
|
|
folders.router,
|
|||
|
|
auth.router,
|
|||
|
|
assets.router,
|
|||
|
|
shared_assets.router,
|
|||
|
|
shared_assets.publish_router,
|
|||
|
|
jobs.router,
|
|||
|
|
events.router,
|
|||
|
|
submissions.router,
|
|||
|
|
tokens.router,
|
|||
|
|
workflows.router,
|
|||
|
|
workflows.runs_router,
|
|||
|
|
batches.router,
|
|||
|
|
system.router,
|
|||
|
|
stories.router,
|
|||
|
|
):
|
|||
|
|
router.include_router(child)
|