Changed endpoints and db queries, chart now shows suggested mins and maxes
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user