From 2a496bd0005fbb67395cfef395653f6c599f002c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 25 Sep 2023 15:30:39 -0400 Subject: [PATCH] Fix subscriber created query for SQLite --- database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.go b/database.go index 4f135c1..88961a0 100644 --- a/database.go +++ b/database.go @@ -3018,7 +3018,7 @@ func (db *datastore) AddEmailSubscription(collID, userID int64, email string, co Valid: userID > 0, } - _, err := db.Exec("INSERT INTO emailsubscribers (id, collection_id, user_id, email, subscribed, token, confirmed) VALUES (?, ?, ?, ?, NOW(), ?, ?)", subID, collID, userIDVal, emailVal, token, confirmed) + _, err := db.Exec("INSERT INTO emailsubscribers (id, collection_id, user_id, email, subscribed, token, confirmed) VALUES (?, ?, ?, ?, "+db.now()+", ?, ?)", subID, collID, userIDVal, emailVal, token, confirmed) if err != nil { if mysqlErr, ok := err.(*mysql.MySQLError); ok { if mysqlErr.Number == mySQLErrDuplicateKey {