Merge pull request #349 from iaineng/fix/use-unified-user-agent-missing

fix: 添加创建Claude账户时缺失的useUnifiedUserAgent字段处理
This commit is contained in:
Wesley Liddick
2025-09-05 13:54:06 +08:00
committed by GitHub

View File

@@ -1902,7 +1902,8 @@ router.post('/claude-accounts', authenticateAdmin, async (req, res) => {
priority, priority,
groupId, groupId,
groupIds, groupIds,
autoStopOnWarning autoStopOnWarning,
useUnifiedUserAgent
} = req.body } = req.body
if (!name) { if (!name) {
@@ -1942,7 +1943,8 @@ router.post('/claude-accounts', authenticateAdmin, async (req, res) => {
accountType: accountType || 'shared', // 默认为共享类型 accountType: accountType || 'shared', // 默认为共享类型
platform, platform,
priority: priority || 50, // 默认优先级为50 priority: priority || 50, // 默认优先级为50
autoStopOnWarning: autoStopOnWarning === true // 默认为false autoStopOnWarning: autoStopOnWarning === true, // 默认为false
useUnifiedUserAgent: useUnifiedUserAgent === true // 默认为false
}) })
// 如果是分组类型,将账户添加到分组 // 如果是分组类型,将账户添加到分组