wip: 手机号注册 INSERT 13值/14列 修复(冒烟实证 SqliteError 致新号建立失败)
This commit is contained in:
@@ -1160,7 +1160,7 @@ app.post('/auth/login', async (req, res) => {
|
||||
const isPhone = /^1\d{10}$/.test(phone);
|
||||
db.prepare(`
|
||||
INSERT INTO users (id, has_account, openid, nickname, avatar_url, phone, weixin, position, industry, hometown, email, expertise, created_at, updated_at)
|
||||
VALUES (?, 1, ?, ?, '', ?, ?, '', '', '', '', ?, ?)
|
||||
VALUES (?, 1, ?, ?, '', ?, ?, '', '', '', '', '', ?, ?)
|
||||
`).run(userId, openid || '', isPhone ? `用户${phone.slice(-4)}` : phone, isPhone ? phone : '', isPhone ? '' : phone, now, now);
|
||||
user = db.prepare('SELECT * FROM users WHERE id = ?').get(userId);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user