Changed endpoints and db queries, chart now shows suggested mins and maxes

This commit is contained in:
Daniel Ledda
2020-11-07 01:11:03 +01:00
parent 2ec25ca6fd
commit e8d2744efe

View File

@@ -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) sendInternalError(fmt.Errorf("couldn't read last snapshot from the database: %w", err), w, r)
return return
} }
json, err := createJsonFromSnapshotRecords(record) json, err := createJsonFromSnapshotRecords([]*SnapshotRecord{record})
if err != nil { if err != nil {
sendInternalError(fmt.Errorf("couldn't create a json from the last record: %w", err), w, r) sendInternalError(fmt.Errorf("couldn't create a json from the last record: %w", err), w, r)
return return