mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
fix: 修复 API Key 创建和编辑时账户绑定冲突问题
- 创建 API Key 时确保 OAuth 和 Console 账户不会同时设置 - 编辑 API Key 时正确清空未使用的账户类型字段 - 使用共享池时清空所有账户绑定 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -878,9 +878,13 @@ const createApiKey = async () => {
|
||||
if (form.claudeAccountId.startsWith('console:')) {
|
||||
// Claude Console账户
|
||||
baseData.claudeConsoleAccountId = form.claudeAccountId.substring(8);
|
||||
// 确保不会同时设置OAuth账号
|
||||
delete baseData.claudeAccountId;
|
||||
} else {
|
||||
// Claude OAuth账户
|
||||
// Claude OAuth账户或分组
|
||||
baseData.claudeAccountId = form.claudeAccountId;
|
||||
// 确保不会同时设置Console账号
|
||||
delete baseData.claudeConsoleAccountId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user