admin: add Total imported and Last sync columns to Garmin sync table

Matches the Strava sync table layout. Accumulates total_imported in
garmin_sync.json state on each sync run; admin API exposes last_sync_at
and total_imported from that file.
This commit is contained in:
Davide Scaini
2026-05-21 20:32:54 +02:00
parent 418e3a13e8
commit d4e5b11f71
3 changed files with 22 additions and 6 deletions
+1
View File
@@ -174,6 +174,7 @@ def garmin_sync_iter(
# ── Persist sync state ─────────────────────────────────────────────────────
state["last_sync_at"] = datetime.now(timezone.utc).strftime("%Y-%m-%d")
state["total_imported"] = state.get("total_imported", 0) + imported
_save_sync_state(user_dir, state)
yield {