refactor(server): 移除鉴权并归档遗留路由至 legacy/
- 删除 auth.py 与 deps.py,各路由去除 get_current_user 依赖 - collection.py 更名为 materials.py,冻结链路(ozon/publish/shops/categories)移入 legacy/ - 扩展默认生图服务端口并入 8800 并自动迁移旧配置,水印默认文案改为 Panda Store - 新增 docs/v2.1/backend-structure.md 后端结构盘点文档
This commit is contained in:
+11
-8
@@ -5,7 +5,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from sqlalchemy import text
|
||||
|
||||
from api import ai, auth, categories, collection, export, fx, image, ozon, products, proxy, publish, shops, suite
|
||||
from api import ai, export, fx, image, materials, products, proxy, suite
|
||||
from config import get_settings
|
||||
from db import get_engine
|
||||
|
||||
@@ -26,22 +26,25 @@ if settings.cors_origin_list:
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# 业务路由
|
||||
app.include_router(auth.router)
|
||||
app.include_router(collection.router)
|
||||
# 业务路由(活跃:采集上报 / 商品库 / 套图生图 / 辅助)
|
||||
app.include_router(materials.router)
|
||||
app.include_router(products.router)
|
||||
app.include_router(shops.router)
|
||||
app.include_router(categories.router)
|
||||
app.include_router(publish.router)
|
||||
app.include_router(fx.router)
|
||||
app.include_router(ai.router)
|
||||
app.include_router(image.router)
|
||||
app.include_router(ozon.router)
|
||||
# V2.1 套图生图(试算页 04 区块)/ 导出 / 图片代理
|
||||
app.include_router(suite.router)
|
||||
app.include_router(export.router)
|
||||
app.include_router(proxy.router)
|
||||
|
||||
# ⚠️ 冻结链路(Ozon API 直传):代码移至 legacy/,接口保留但不再投入
|
||||
from legacy.api import categories, ozon, publish, shops # noqa: E402
|
||||
|
||||
app.include_router(shops.router)
|
||||
app.include_router(categories.router)
|
||||
app.include_router(publish.router)
|
||||
app.include_router(ozon.router)
|
||||
|
||||
|
||||
@app.on_event("startup")
|
||||
async def on_startup() -> None:
|
||||
|
||||
Reference in New Issue
Block a user