Implement writing price to db
This commit is contained in:
9
service.go
Normal file
9
service.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
func SavePrice(db *DB, price int) error {
|
||||
_, err := db.writeConn.Exec("INSERT INTO price(price) VALUES (?)", price)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user