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.
26 lines
721 B
26 lines
721 B
|
9 months ago
|
import {
|
||
|
|
Workflow,
|
||
|
|
WorkflowSearch,
|
||
|
9 months ago
|
} from "@/components/models/management/Workflow";
|
||
|
10 months ago
|
import { request } from "@/components/service/index";
|
||
|
9 months ago
|
export const WorkflowService = {
|
||
|
10 months ago
|
add: (payload: Workflow) => {
|
||
|
|
return request.post("/api/workflows", payload);
|
||
|
|
},
|
||
|
9 months ago
|
getAll: () => {
|
||
|
|
return request.get("/api/workflows", {});
|
||
|
|
},
|
||
|
10 months ago
|
delete: (id: Number) => {
|
||
|
|
return request.delete(`/api/workflows/${id}`, {});
|
||
|
|
},
|
||
|
9 months ago
|
view: (id: Number) => {
|
||
|
|
return request.get(`/api/workflows/${id}`, {});
|
||
|
|
},
|
||
|
9 months ago
|
update: (id: number, payload: Workflow) => {
|
||
|
|
return request.put(`/api/workflows/${id}`, payload);
|
||
|
|
},
|
||
|
9 months ago
|
search: (payload: WorkflowSearch) => {
|
||
|
|
return request.get("/api/workflows/search", payload);
|
||
|
|
},
|
||
|
10 months ago
|
};
|