finding a bug
This commit is contained in:
@@ -60,11 +60,14 @@ func viewHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
_, _ = climateDb.Query(
|
||||
_, err = climateDb.Query(
|
||||
"INSERT INTO `snapshots` (`temp`, `humidity`, `co2`, `time`, `id`) VALUES (%v, %v, %v, %v, NULL);",
|
||||
snapshotSub.Temp,
|
||||
snapshotSub.Humidity,
|
||||
snapshotSub.Timestamp,
|
||||
snapshotSub.Co2)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user