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

Function toggleService

static/js/email_services.js:653–663  ·  view source on GitHub ↗
(id, enabled)

Source from the content-addressed store, hash-verified

651
652// 切换服务状态
653async function toggleService(id, enabled) {
654 try {
655 await api.patch(`/email-services/${id}`, { enabled });
656 toast.success(enabled ? '已启用' : '已禁用');
657 loadOutlookServices();
658 loadCustomServices();
659 loadStats();
660 } catch (error) {
661 toast.error('操作失败: ' + error.message);
662 }
663}
664
665// 测试服务
666async function testService(id) {

Callers

nothing calls this directly

Calls 6

loadOutlookServicesFunction · 0.85
loadCustomServicesFunction · 0.85
successMethod · 0.80
errorMethod · 0.80
loadStatsFunction · 0.70
patchMethod · 0.45

Tested by

no test coverage detected