Fix counter

This commit is contained in:
Daniel Mason 2025-06-03 17:11:40 +12:00
parent cc9d2d5aae
commit 5bac56f38a
Signed by: idanoo
GPG key ID: 387387CDBC02F132

View file

@ -30,7 +30,7 @@ func (db *Database) GetCounterFor(key string) (time.Time, error) {
// UpdateCounterFor - Add counter
func (db *Database) UpdateCounterFor(key string, timestamp time.Time) (int64, error) {
exec, err := db.db.Exec(
"REPLACE INTO `counter` (`key`, `timestamp`) VALUES (?,?)",
"UPDATE `counter` SET `timestamp` = ? WHERE `key` = ?",
key,
timestamp,
)