分模候选方案
This commit is contained in:
+9
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user