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

Function toggleService

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

Source from the content-addressed store, hash-verified

797
798// 切换服务状态
799async function toggleService(id, enabled) {
800 try {
801 const endpoint = enabled ? 'enable' : 'disable';
802 await api.post(`/email-services/${id}/${endpoint}`);
803 toast.success(enabled ? '服务已启用' : '服务已禁用');
804 loadEmailServices();
805 } catch (error) {
806 toast.error('操作失败: ' + error.message);
807 }
808}
809
810// 删除服务
811async function deleteService(id) {

Callers

nothing calls this directly

Calls 4

loadEmailServicesFunction · 0.85
successMethod · 0.80
errorMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected