0.1.52 Gateway

This commit is contained in:
ponzischeme89
2026-08-17 19:09:17 +12:00
parent d5a8d3ad88
commit 1da91e40a1
46 changed files with 1626 additions and 106 deletions
+7
View File
@@ -297,6 +297,10 @@ func (s *Server) handleDeleteDevice(w http.ResponseWriter, r *http.Request, curr
s.loggerFor(r.Context()).Warn("device version cleanup failed",
"removed_device_id", deviceID, "error", err)
}
if err := s.store.DeleteDeviceActivityDays(r.Context(), deviceID); err != nil {
s.loggerFor(r.Context()).Warn("device activity cleanup failed",
"removed_device_id", deviceID, "error", err)
}
// A device disappearing from a household is worth a line: the next thing that TV
// reports is a sign-in, and the two together explain each other.
s.loggerFor(r.Context()).Info("device signed out remotely", "removed_device_id", deviceID)
@@ -335,6 +339,9 @@ func (s *Server) retireSupersededDevices(ctx context.Context, devices []store.Su
if err := s.store.DeleteDeviceVersions(ctx, ids...); err != nil {
s.loggerFor(ctx).Warn("device version cleanup failed", "error", err)
}
if err := s.store.DeleteDeviceActivityDays(ctx, ids...); err != nil {
s.loggerFor(ctx).Warn("device activity cleanup failed", "error", err)
}
s.loggerFor(ctx).Info("device identity superseded", "retired_device_ids", ids)
}