From e8d2744efe07bfb289e8726ce0e7f9d548a45712 Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 7 Nov 2020 01:11:03 +0100 Subject: [PATCH] Changed endpoints and db queries, chart now shows suggested mins and maxes --- climate-server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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