Dev #26

Open
overseer wants to merge 65 commits from dev into main
Showing only changes of commit b1ed8cdb20 - Show all commits
+5 -2
View File
@@ -33,8 +33,11 @@ type StatusLog struct {
type CameraStatus struct {
CameraID string `json:"camera_id"`
FriendlyName string `json:"friendly_name"`
BatteryPct *int `json:"battery_pct,omitempty"`
VideoRemainingSec *int `json:"video_remaining_sec,omitempty"`
// Not omitempty: the SPA expects these as `number | null`. Omitting them
// makes the field `undefined` in JS, which slips past null checks and
// renders as "NaN%".
BatteryPct *int `json:"battery_pct"`
VideoRemainingSec *int `json:"video_remaining_sec"`
Recording bool `json:"recording"`
Mode string `json:"mode"`
Resolution string `json:"resolution"`