mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-06-16 21:03:58 +08:00
refactor(providers): remove unused index-based PATCH endpoints
updateGeminiKey, updateCodexConfig, updateClaudeConfig, updateVertexConfig and updateOpenAIProvider had no callers; the workbench saves whole lists via PUT and only updateOpenAIProviderDisabled is used for toggling.
This commit is contained in:
@@ -392,9 +392,6 @@ export const providersApi = {
|
||||
)
|
||||
),
|
||||
|
||||
updateGeminiKey: (index: number, value: GeminiKeyConfig) =>
|
||||
apiClient.patch('/gemini-api-key', { index, value: serializeGeminiKey(value) }),
|
||||
|
||||
deleteGeminiKey: (apiKey: string, baseUrl?: string) =>
|
||||
apiClient.delete(`/gemini-api-key${buildProviderDeleteQuery(apiKey, baseUrl)}`),
|
||||
|
||||
@@ -418,9 +415,6 @@ export const providersApi = {
|
||||
)
|
||||
),
|
||||
|
||||
updateCodexConfig: (index: number, value: ProviderKeyConfig) =>
|
||||
apiClient.patch('/codex-api-key', { index, value: serializeProviderKey(value) }),
|
||||
|
||||
deleteCodexConfig: (apiKey: string, baseUrl?: string) =>
|
||||
apiClient.delete(`/codex-api-key${buildProviderDeleteQuery(apiKey, baseUrl)}`),
|
||||
|
||||
@@ -444,9 +438,6 @@ export const providersApi = {
|
||||
)
|
||||
),
|
||||
|
||||
updateClaudeConfig: (index: number, value: ProviderKeyConfig) =>
|
||||
apiClient.patch('/claude-api-key', { index, value: serializeProviderKey(value) }),
|
||||
|
||||
deleteClaudeConfig: (apiKey: string, baseUrl?: string) =>
|
||||
apiClient.delete(`/claude-api-key${buildProviderDeleteQuery(apiKey, baseUrl)}`),
|
||||
|
||||
@@ -470,9 +461,6 @@ export const providersApi = {
|
||||
)
|
||||
),
|
||||
|
||||
updateVertexConfig: (index: number, value: ProviderKeyConfig) =>
|
||||
apiClient.patch('/vertex-api-key', { index, value: serializeVertexKey(value) }),
|
||||
|
||||
deleteVertexConfig: (apiKey: string, baseUrl?: string) =>
|
||||
apiClient.delete(`/vertex-api-key${buildProviderDeleteQuery(apiKey, baseUrl)}`),
|
||||
|
||||
@@ -496,9 +484,6 @@ export const providersApi = {
|
||||
)
|
||||
),
|
||||
|
||||
updateOpenAIProvider: (index: number, value: OpenAIProviderConfig) =>
|
||||
apiClient.patch('/openai-compatibility', { index, value: serializeOpenAIProvider(value) }),
|
||||
|
||||
updateOpenAIProviderDisabled: (index: number, disabled: boolean) =>
|
||||
apiClient.patch('/openai-compatibility', { index, value: { disabled } }),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user