分模候选方案

This commit is contained in:
2026-04-23 23:57:34 +08:00
parent c1f6b6e827
commit f9acdb767b
5 changed files with 94 additions and 35 deletions
+9 -1
View File
@@ -127,7 +127,15 @@ try:
from api.v1 import router as moldinsight_router
except Exception as e:
moldinsight_router = None
print(f"[WARN] MoldInsight路由未加载: {e}")
print(f"[WARN] MoldInsight v1路由未加载: {e}")
if moldinsight_router is None:
try:
from api.routes import router as moldinsight_router
print("[WARN] 已回退到旧版 MoldInsight 路由")
except Exception as fallback_error:
moldinsight_router = None
print(f"[WARN] MoldInsight旧版路由也未加载: {fallback_error}")
if moldinsight_router is not None:
app.include_router(moldinsight_router, prefix="/api")