21 lines
386 B
Python
21 lines
386 B
Python
|
|
"""
|
||
|
|
API v1 路由聚合
|
||
|
|
"""
|
||
|
|
from fastapi import APIRouter
|
||
|
|
from app.api.v1.endpoints import users, products
|
||
|
|
|
||
|
|
# 创建 v1 版本的主路由
|
||
|
|
api_router = APIRouter()
|
||
|
|
|
||
|
|
# 注册所有端点路由
|
||
|
|
api_router.include_router(
|
||
|
|
users.router,
|
||
|
|
prefix="/users",
|
||
|
|
tags=["用户管理"]
|
||
|
|
)
|
||
|
|
|
||
|
|
api_router.include_router(
|
||
|
|
products.router,
|
||
|
|
prefix="/products",
|
||
|
|
tags=["产品管理"]
|
||
|
|
)
|