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