mirror of
https://github.com/writeas/writefreely
synced 2025-02-06 17:03:39 +01:00
Fix subscriber created query for SQLite
This commit is contained in:
parent
15047b7288
commit
2a496bd000
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user