wip: 手机号注册 INSERT 13值/14列 修复(冒烟实证 SqliteError 致新号建立失败)

This commit is contained in:
2026-11-17 00:59:23 +08:00
parent 0bab5f5f6c
commit 13f438c6ac
+1 -1
View File
@@ -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 {