22 lines
624 B
TypeScript
22 lines
624 B
TypeScript
import instance from './instance';
|
|
|
|
export const getProjectList = async () => {
|
|
const response = await instance.get('/api/v1/projects');
|
|
return response.data;
|
|
};
|
|
|
|
export const createProject = async (data: any) => {
|
|
const response = await instance.post('/api/v1/projects', data);
|
|
return response.data;
|
|
};
|
|
|
|
export const updateProject = async (id: string, data: any) => {
|
|
const response = await instance.put(`/api/v1/projects/${id}`, data);
|
|
return response.data;
|
|
};
|
|
|
|
export const deleteProject = async (id: string) => {
|
|
const response = await instance.delete(`/api/v1/projects/${id}`);
|
|
return response.data;
|
|
};
|