(id, enabled)
| 651 | |
| 652 | // 切换服务状态 |
| 653 | async 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 | // 测试服务 |
| 666 | async function testService(id) { |
nothing calls this directly
no test coverage detected