mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
fix: error when login in with different email
This commit is contained in:
parent
3d7b49d991
commit
53e57c1d2f
@ -29,7 +29,7 @@ export class UserTable {
|
||||
.run(id, email, "", type, now, now)
|
||||
logger.success(`add user ${id}`)
|
||||
} else if (u.email !== email && u.type !== type) {
|
||||
await this.db.prepare(`UPDATE user SET email = ?, updated = ? WHERE id = ?`).run(id, email, now)
|
||||
await this.db.prepare(`UPDATE user SET email = ?, updated = ? WHERE id = ?`).run(email, now, id)
|
||||
logger.success(`update user ${id} email`)
|
||||
} else {
|
||||
logger.info(`user ${id} already exists`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user