mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-17 12:14:02 +08:00
feat(api): add unified v2 response layer
This commit is contained in:
@@ -8,10 +8,15 @@ def init_routers(app: FastAPI):
|
||||
初始化路由
|
||||
"""
|
||||
from app.api.apiv1 import api_router
|
||||
from app.api.apiv2 import api_router_v2
|
||||
from app.api.apiv2_utils import API_V2_STR, configure_v2_openapi
|
||||
from app.api.servarr import arr_router
|
||||
from app.api.servcookie import cookie_router
|
||||
# API路由
|
||||
app.include_router(api_router, prefix=settings.API_V1_STR)
|
||||
# v2 API复用v1路由,仅在响应出口统一封装
|
||||
app.include_router(api_router_v2, prefix=API_V2_STR)
|
||||
configure_v2_openapi(app)
|
||||
# Radarr、Sonarr路由
|
||||
app.include_router(arr_router, prefix="/api/v3")
|
||||
# CookieCloud路由
|
||||
|
||||
Reference in New Issue
Block a user