Skip to content

Commit

Permalink
fix: api.ts Change the parameter passing method (#10903)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangrenyang authored Aug 26, 2023
1 parent 753945e commit 6ba66b8
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/services/ant-design-pro/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,35 @@ export async function rule(
});
}

/** ζ–°ε»Ίθ§„εˆ™ PUT /api/rule */
/** ζ›΄ζ–°θ§„εˆ™ PUT /api/rule */
export async function updateRule(options?: { [key: string]: any }) {
return request<API.RuleListItem>('/api/rule', {
method: 'PUT',
...(options || {}),
method: 'POST',
data:{
method: 'update',
...(options || {}),
}
});
}

/** ζ–°ε»Ίθ§„εˆ™ POST /api/rule */
export async function addRule(options?: { [key: string]: any }) {
return request<API.RuleListItem>('/api/rule', {
method: 'POST',
...(options || {}),
data:{
method: 'post',
...(options || {}),
}
});
}

/** εˆ ι™€θ§„εˆ™ DELETE /api/rule */
export async function removeRule(options?: { [key: string]: any }) {
return request<Record<string, any>>('/api/rule', {
method: 'DELETE',
...(options || {}),
method: 'POST',
data:{
method: 'delete',
...(options || {}),
}
});
}

0 comments on commit 6ba66b8

Please sign in to comment.