Change addressing scheme and fix SQL bug

This commit is contained in:
Kelvin Ly 2023-05-16 23:07:25 -04:00
parent ce2cac6602
commit 13239a6b91
2 changed files with 2 additions and 2 deletions

View File

@ -92,6 +92,6 @@ func InsertRow(db *sql.DB, s *DataJson) error {
}
func ClearOldRows(db *sql.DB, min_time int64) error {
_, err := db.Exec("DELETE FROM shrooms WHERE t < ?", min_time)
_, err := db.Exec("DELETE FROM shrooms WHERE time < ?", min_time)
return err
}

View File

@ -223,7 +223,7 @@ func main() {
}
}()
err = http.ListenAndServe("localhost:8085", nil)
err = http.ListenAndServe(":8085", nil)
if err != nil {
log.Fatal("unable to start server: ", err)
}