chore: 新增一批接口
This commit is contained in:
23
apps/designer/src/io/materials.ts
Normal file
23
apps/designer/src/io/materials.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import instance from './instance';
|
||||
|
||||
export const getMaterialsList = async (data?: Record<string, any>) => {
|
||||
const response = await instance.get('/api/v1/materials', {
|
||||
params: data
|
||||
});
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const createMaterials = async (data: any) => {
|
||||
const response = await instance.post('/api/v1/materials', data);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const updateMaterials = async (id: string, data: any) => {
|
||||
const response = await instance.put(`/api/v1/materials/${id}`, data);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const deleteMaterials = async (id: string) => {
|
||||
const response = await instance.delete(`/api/v1/materials/${id}`);
|
||||
return response.data;
|
||||
};
|
||||
Reference in New Issue
Block a user