feat(sfm): device_commands audit table -- one row per change attempt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
7ff527df07
commit
fb9b48f259
4 files changed
+160
No files matched your search
@@ -3080,6 +3080,17 @@ def db_sessions(
|
||||
return {"count": len(rows), "sessions": rows}
|
||||
|
||||
|
||||
@app.get("/db/device_commands")
|
||||
def db_device_commands(
|
||||
serial: Optional[str] = Query(None, description="Filter by unit serial"),
|
||||
limit: int = Query(100, description="Max rows to return"),
|
||||
) -> dict:
|
||||
"""
|
||||
The audit trail of changes SFM attempted on units, newest first.
|
||||
"""
|
||||
return {"commands": _get_db().query_device_commands(serial, limit)}
|
||||
|
||||
|
||||
# ── Entry point ────────────────────────────────────────────────────────────────
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user