You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
475 B
14 lines
475 B
|
10 months ago
|
import { request } from "@/components/service/index";
|
||
|
|
import { ApiProject } from "@/components/models/project/Project";
|
||
|
|
|
||
|
|
export const ProjectService = {
|
||
|
|
search: () => request.get("/api/projects", {}),
|
||
|
|
add: (payload: ApiProject) => {
|
||
|
|
return request.post("/api/projects", payload);
|
||
|
|
},
|
||
|
|
update: (id: number, payload: ApiProject) => {
|
||
|
|
return request.put(`/api/projects/${id}`, payload);
|
||
|
|
},
|
||
|
|
delete: (id: number) => request.delete(`/api/projects/${id}`, {}),
|
||
|
|
};
|