(id, enabled)
| 797 | |
| 798 | // 切换服务状态 |
| 799 | async 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 | // 删除服务 |
| 811 | async function deleteService(id) { |
nothing calls this directly
no test coverage detected