diff --git a/server/database/user.ts b/server/database/user.ts index e07f5ea..aff3022 100644 --- a/server/database/user.ts +++ b/server/database/user.ts @@ -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`)