Files
xiaoxia-saas/apps/api/app/api/router.py
T
Audit Bot e723025889
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
fix: 修复 projects 500 + 实现 dashboard/overview 端点
Bug 1: GET /api/v1/projects → 500
- _to_project_response() 缺少 owner_user_id 和 shared_users 字段
- 补全 ProjectResponse schema 必填字段

Bug 2: GET /api/v1/dashboard/overview → 404
- 新建 dashboard schema + route
- 添加 count_by_user / count_by_project_ids / sum_storage_by_project_ids 仓储方法
- 注册 /api/v1/dashboard 路由
2026-06-29 18:12:39 +08:00

119 lines
3.3 KiB
Python

from app.api.routes.dashboard import router as dashboard_router
from app.api.routes.asset_diagnosis import router as asset_diagnosis_router
from app.api.routes.asset_libraries import router as asset_libraries_router
from app.api.routes.assets import router as assets_router
from app.api.routes.auth import router as auth_router
from app.api.routes.chunked_upload import router as chunked_upload_router
from app.api.routes.classification_jobs import router as classification_jobs_router
from app.api.routes.duplication import router as duplication_router
from app.api.routes.generated_videos import router as generated_videos_router
from app.api.routes.recipes import router as recipes_router
from app.api.routes.subscription import router as subscription_router
from app.api.routes.templates import router as templates_router
from app.api.routes.titles import router as titles_router
from app.api.routes.voices import router as voices_router
from app.api.routes.generation_tasks import router as generation_tasks_router
from app.api.routes.health import router as health_check_router
from app.api.routes.ingest_jobs import router as ingest_jobs_router
from app.api.routes.projects import router as projects_router
from app.api.routes.task_center import router as task_center_router
from app.api.routes.upload import router as upload_router
from fastapi import APIRouter
api_router = APIRouter(prefix="/api/v1")
health_router = APIRouter()
health_router.include_router(health_check_router)
api_router.include_router(
auth_router,
tags=["Auth"],
)
api_router.include_router(
projects_router,
prefix="/projects",
tags=["Project"],
)
api_router.include_router(
task_center_router,
tags=["TaskCenter"],
)
api_router.include_router(
asset_diagnosis_router,
tags=["AssetDiagnosis"],
)
api_router.include_router(
asset_libraries_router,
prefix="/asset-libraries",
tags=["AssetLibrary"],
)
api_router.include_router(
assets_router,
prefix="/assets",
tags=["Asset"],
)
api_router.include_router(
ingest_jobs_router,
prefix="/ingest-jobs",
tags=["IngestJob"],
)
api_router.include_router(
classification_jobs_router,
prefix="/classification-jobs",
tags=["ClassificationJob"],
)
api_router.include_router(
upload_router,
prefix="/upload",
tags=["Upload"],
)
api_router.include_router(
chunked_upload_router,
prefix="/upload/chunk",
tags=["ChunkedUpload"],
)
api_router.include_router(
generation_tasks_router,
prefix="/generation",
tags=["Generation"],
)
api_router.include_router(
generated_videos_router,
prefix="/generated-videos",
tags=["GeneratedVideo"],
)
api_router.include_router(
titles_router,
prefix="/titles",
tags=["TitleLibrary"],
)
api_router.include_router(
voices_router,
prefix="/voices",
tags=["VoiceLibrary"],
)
api_router.include_router(
duplication_router,
prefix="/duplication",
tags=["Duplication"],
)
api_router.include_router(
subscription_router,
prefix="/subscription",
tags=["Subscription"],
)
api_router.include_router(
recipes_router,
prefix="/recipes",
tags=["Recipe"],
)
api_router.include_router(
templates_router,
prefix="/templates",
tags=["Template"],
)
api_router.include_router(
dashboard_router,
prefix="/dashboard",
tags=["Dashboard"],
)