diff --git a/src/services/ant-design-pro/api.ts b/src/services/ant-design-pro/api.ts index cbd596160e..b42bdfcffa 100644 --- a/src/services/ant-design-pro/api.ts +++ b/src/services/ant-design-pro/api.ts @@ -60,11 +60,14 @@ export async function rule( }); } -/** 新建规则 PUT /api/rule */ +/** 更新规则 PUT /api/rule */ export async function updateRule(options?: { [key: string]: any }) { return request('/api/rule', { - method: 'PUT', - ...(options || {}), + method: 'POST', + data:{ + method: 'update', + ...(options || {}), + } }); } @@ -72,14 +75,20 @@ export async function updateRule(options?: { [key: string]: any }) { export async function addRule(options?: { [key: string]: any }) { return request('/api/rule', { method: 'POST', - ...(options || {}), + data:{ + method: 'post', + ...(options || {}), + } }); } /** 删除规则 DELETE /api/rule */ export async function removeRule(options?: { [key: string]: any }) { return request>('/api/rule', { - method: 'DELETE', - ...(options || {}), + method: 'POST', + data:{ + method: 'delete', + ...(options || {}), + } }); }