mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-09-28 04:42:12 +08:00
42 lines
983 B
TypeScript
42 lines
983 B
TypeScript
import api from "./api";
|
|
|
|
export function getTaskAll() {
|
|
return api.get("/task/all", undefined).then((res) => res);
|
|
}
|
|
|
|
export function getTaskAllWait() {
|
|
return api.get("/task/all/wait", undefined).then((res) => res);
|
|
}
|
|
|
|
export function getTaskById(id) {
|
|
return api.get("/task", { id }).then((res) => res);
|
|
}
|
|
|
|
export function startTaskById(id) {
|
|
return api.get("/task/start", { id }).then((res) => res);
|
|
}
|
|
|
|
export function stopTaskById(id) {
|
|
return api.get("/task/stop", { id }).then((res) => res);
|
|
}
|
|
|
|
export function editTaskEnable(body) {
|
|
return api.put("/task/enable", body).then((res) => res);
|
|
}
|
|
|
|
export function editTask(body) {
|
|
return api.put("/task", body).then((res) => res);
|
|
}
|
|
|
|
export function addTask(body) {
|
|
return api.post("/task", body).then((res) => res);
|
|
}
|
|
|
|
export function deleteTaskById(id) {
|
|
return api.delete("/task", { id }).then((res) => res);
|
|
}
|
|
|
|
export function changeTaskKey(id) {
|
|
return api.post("/task/key", { id }).then((res) => res);
|
|
}
|