finding a bug
This commit is contained in:
@@ -61,11 +61,11 @@ func viewHandler(w http.ResponseWriter, r *http.Request) {
|
||||
log.Fatal(err)
|
||||
}
|
||||
_, 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.Humidity,
|
||||
snapshotSub.Timestamp,
|
||||
snapshotSub.Co2)
|
||||
snapshotSub.Co2))
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user