Add per-item inventory sparklines with expandable history charts.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,6 +19,7 @@ from db import (
|
||||
get_snapshot,
|
||||
import_save,
|
||||
init_db,
|
||||
inventory_timeline,
|
||||
list_snapshots,
|
||||
get_connection,
|
||||
timeline,
|
||||
@@ -113,6 +114,12 @@ def api_timeline(viewer_id: str):
|
||||
return jsonify(timeline(db_path=db_path))
|
||||
|
||||
|
||||
@viewer_bp.route("/api/inventory/timeline")
|
||||
def api_inventory_timeline(viewer_id: str):
|
||||
db_path = _resolve_viewer_db(viewer_id)
|
||||
return jsonify(inventory_timeline(db_path=db_path))
|
||||
|
||||
|
||||
@viewer_bp.route("/api/import", methods=["POST"])
|
||||
@limiter.limit(IMPORT_LIMIT)
|
||||
def api_import(viewer_id: str):
|
||||
|
||||
Reference in New Issue
Block a user