mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
fix: API Key permissions multi-select save and display issue
- Fix updateApiKey to use JSON.stringify for permissions field - Add comma-separated string handling in normalizePermissions - Add frontend parsing for comma-separated permissions format Fixes issue where selecting multiple permissions (e.g. Claude + OpenAI) would be saved as "claude,openai" instead of '["claude","openai"]'
This commit is contained in:
@@ -1246,6 +1246,12 @@ onMounted(async () => {
|
||||
} catch {
|
||||
perms = VALID_PERMS.includes(perms) ? [perms] : []
|
||||
}
|
||||
} else if (perms.includes(',')) {
|
||||
// 兼容逗号分隔格式(如 "claude,openai")
|
||||
perms = perms
|
||||
.split(',')
|
||||
.map((p) => p.trim())
|
||||
.filter((p) => VALID_PERMS.includes(p))
|
||||
} else if (VALID_PERMS.includes(perms)) {
|
||||
perms = [perms]
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user