Auto-refresh review list and stats when trades or annotations change.
Clarify that category/style breakdowns need manual entry tagging. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -941,6 +941,20 @@ def register_routes(app: Flask) -> None:
|
||||
total_pages=total_pages,
|
||||
)
|
||||
|
||||
@app.get("/api/records/fingerprint")
|
||||
@login_required
|
||||
def records_fingerprint():
|
||||
"""复盘列表/统计页轮询:成交或标注变化时前端自动刷新。"""
|
||||
u = current_user()
|
||||
machine_raw = (request.args.get("machine_id") or "").strip()
|
||||
account_id = None if u["role"] == "admin" else u.get("account_id")
|
||||
_machines, machine_id = _resolve_machine_filter(u, machine_raw)
|
||||
with database.get_db() as conn:
|
||||
fp = database.trades_fingerprint(
|
||||
conn, account_id=account_id, machine_id=machine_id
|
||||
)
|
||||
return jsonify({"ok": True, "fp": fp, "ts": database.now()})
|
||||
|
||||
@app.get("/records/stats")
|
||||
@login_required
|
||||
def records_stats_page():
|
||||
|
||||
Reference in New Issue
Block a user