fix(server): effectiveness路由移到app.run()之前(修复404)

This commit is contained in:
xxm
2026-08-21 03:00:36 +08:00
parent 5b9d46efc6
commit 207066e76b
+7 -5
View File
@@ -2406,11 +2406,6 @@ def api_docs_read():
return jsonify({"ok": True, "content": f.read_text(encoding="utf-8")})
if __name__ == "__main__":
port = int(os.environ.get("PORT", 8899))
print(f"🚀 MoFin Dashboard → http://0.0.0.0:{port}")
app.run(host="0.0.0.0", port=port, debug=False)
# ── 策略评估 API ────────────────────────────────────────
@app.route("/api/research/effectiveness")
def api_research_effectiveness():
@@ -2508,3 +2503,10 @@ def api_research_execution_log():
rows = db.execute(query, params).fetchall()
db.close()
return jsonify([dict(r) for r in rows])
if __name__ == "__main__":
port = int(os.environ.get("PORT", 8899))
print(f"🚀 MoFin Dashboard → http://0.0.0.0:{port}")
app.run(host="0.0.0.0", port=port, debug=False)