mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 21:01:24 +00:00
fix: 添加创建Claude账户时缺失的useUnifiedUserAgent字段处理
- 在 /admin/claude-accounts POST 路由中添加 useUnifiedUserAgent 参数解构 - 将 useUnifiedUserAgent 参数传递给 claudeAccountService.createAccount() 方法 - 保持与前端 AccountForm.vue 和服务层 claudeAccountService.js 的一致性
This commit is contained in:
@@ -1902,7 +1902,8 @@ router.post('/claude-accounts', authenticateAdmin, async (req, res) => {
|
||||
priority,
|
||||
groupId,
|
||||
groupIds,
|
||||
autoStopOnWarning
|
||||
autoStopOnWarning,
|
||||
useUnifiedUserAgent
|
||||
} = req.body
|
||||
|
||||
if (!name) {
|
||||
@@ -1942,7 +1943,8 @@ router.post('/claude-accounts', authenticateAdmin, async (req, res) => {
|
||||
accountType: accountType || 'shared', // 默认为共享类型
|
||||
platform,
|
||||
priority: priority || 50, // 默认优先级为50
|
||||
autoStopOnWarning: autoStopOnWarning === true // 默认为false
|
||||
autoStopOnWarning: autoStopOnWarning === true, // 默认为false
|
||||
useUnifiedUserAgent: useUnifiedUserAgent === true // 默认为false
|
||||
})
|
||||
|
||||
// 如果是分组类型,将账户添加到分组
|
||||
|
||||
Reference in New Issue
Block a user