diff --git a/climate-server.go b/climate-server.go index 3b8392f..ea688b7 100644 --- a/climate-server.go +++ b/climate-server.go @@ -91,7 +91,7 @@ func sendLastSnapshot(w http.ResponseWriter, r *http.Request) { sendInternalError(fmt.Errorf("couldn't read last snapshot from the database: %w", err), w, r) return } - json, err := createJsonFromSnapshotRecords(record) + json, err := createJsonFromSnapshotRecords([]*SnapshotRecord{record}) if err != nil { sendInternalError(fmt.Errorf("couldn't create a json from the last record: %w", err), w, r) return