21 lines
514 B
Python
21 lines
514 B
Python
|
|
"""API 路由汇总。
|
|||
|
|
|
|||
|
|
各业务模块的路由在此挂载。业务接口统一放在 `/api/v1/` 之下,
|
|||
|
|
健康检查作为运维探针不带版本号,直接位于 `/api/health`。
|
|||
|
|
"""
|
|||
|
|
|
|||
|
|
from fastapi import APIRouter
|
|||
|
|
|
|||
|
|
from app.api import health
|
|||
|
|
from app.api.v1 import auth
|
|||
|
|
|
|||
|
|
api_router = APIRouter()
|
|||
|
|
|
|||
|
|
# 运维探针:/api/health
|
|||
|
|
api_router.include_router(health.router)
|
|||
|
|
|
|||
|
|
# 业务接口:/api/v1/*
|
|||
|
|
v1_router = APIRouter(prefix="/v1")
|
|||
|
|
v1_router.include_router(auth.router)
|
|||
|
|
api_router.include_router(v1_router)
|