mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
Merge pull request #387 from f3n9/main-um-8
修复用户自行创建的API Key缺少服务权限信息的问题
This commit is contained in:
@@ -315,7 +315,8 @@ router.post('/api-keys', authenticateUser, async (req, res) => {
|
||||
expiresAt: expiresAt || null,
|
||||
dailyCostLimit: dailyCostLimit || null,
|
||||
createdBy: 'user',
|
||||
permissions: ['messages'] // 用户创建的API Key默认只有messages权限
|
||||
// 设置服务权限为全部服务,确保前端显示“服务权限”为“全部服务”且具备完整访问权限
|
||||
permissions: 'all'
|
||||
}
|
||||
|
||||
const newApiKey = await apiKeyService.createApiKey(apiKeyData)
|
||||
|
||||
Reference in New Issue
Block a user