MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / toggleProxyItem

Function toggleProxyItem

static/js/settings.js:1188–1197  ·  view source on GitHub ↗
(id, enabled)

Source from the content-addressed store, hash-verified

1186
1187// 切换代理状态
1188async function toggleProxyItem(id, enabled) {
1189 try {
1190 const endpoint = enabled ? 'enable' : 'disable';
1191 await api.post(`/settings/proxies/${id}/${endpoint}`);
1192 toast.success(enabled ? '代理已启用' : '代理已禁用');
1193 loadProxies();
1194 } catch (error) {
1195 toast.error('操作失败: ' + error.message);
1196 }
1197}
1198
1199// 删除代理
1200async function deleteProxyItem(id) {

Callers

nothing calls this directly

Calls 4

loadProxiesFunction · 0.85
successMethod · 0.80
errorMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected