mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 10:17:05 +00:00
fix(ui): correct cliproxy account API paths
- Change /cliproxy/accounts/* to /cliproxy/auth/accounts/* - Fix 404 errors when managing CLIProxy accounts from dashboard - Root cause: frontend called wrong endpoints for account management
This commit is contained in:
@@ -307,16 +307,18 @@ export const api = {
|
|||||||
|
|
||||||
// Multi-account management
|
// Multi-account management
|
||||||
accounts: {
|
accounts: {
|
||||||
list: () => request<{ accounts: ProviderAccountsMap }>('/cliproxy/accounts'),
|
list: () => request<{ accounts: ProviderAccountsMap }>('/cliproxy/auth/accounts'),
|
||||||
listByProvider: (provider: string) =>
|
listByProvider: (provider: string) =>
|
||||||
request<{ provider: string; accounts: OAuthAccount[] }>(`/cliproxy/accounts/${provider}`),
|
request<{ provider: string; accounts: OAuthAccount[] }>(
|
||||||
|
`/cliproxy/auth/accounts/${provider}`
|
||||||
|
),
|
||||||
setDefault: (provider: string, accountId: string) =>
|
setDefault: (provider: string, accountId: string) =>
|
||||||
request(`/cliproxy/accounts/${provider}/default`, {
|
request(`/cliproxy/auth/accounts/${provider}/default`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({ accountId }),
|
body: JSON.stringify({ accountId }),
|
||||||
}),
|
}),
|
||||||
remove: (provider: string, accountId: string) =>
|
remove: (provider: string, accountId: string) =>
|
||||||
request(`/cliproxy/accounts/${provider}/${accountId}`, { method: 'DELETE' }),
|
request(`/cliproxy/auth/accounts/${provider}/${accountId}`, { method: 'DELETE' }),
|
||||||
},
|
},
|
||||||
// OAuth flow
|
// OAuth flow
|
||||||
auth: {
|
auth: {
|
||||||
|
|||||||
Reference in New Issue
Block a user