各种功能
This commit is contained in:
@@ -52,7 +52,10 @@ export const put = (url, data, options = {}) =>
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
|
||||
export const del = (url, options = {}) =>
|
||||
fetchApi(url, { ...options, method: "DELETE" });
|
||||
export const del = (url, data, options = {}) => {
|
||||
const config = { ...options, method: "DELETE" };
|
||||
if (data) config.body = JSON.stringify(data);
|
||||
return fetchApi(url, config);
|
||||
};
|
||||
|
||||
export { mock };
|
||||
Reference in New Issue
Block a user