แก้ไขสถานะ กับ ลบ

This commit is contained in:
Net 2024-07-19 14:33:29 +07:00
parent efe4fd5950
commit e969ff7ba4
2 changed files with 38 additions and 11 deletions

View file

@ -294,6 +294,18 @@ export const useDataStore = defineStore("systemStore", () => {
});
}
async function toggleSchedule(id: string) {
showLoader();
await http
.post(config.API.backup + "/schedule/" + id + "/toggle")
.then(async (res) => {
return res.data;
})
.finally(() => {
hideLoader();
});
}
async function deleteSchedule(id: string) {
showLoader();
await http
@ -327,5 +339,7 @@ export const useDataStore = defineStore("systemStore", () => {
createSchedule,
editSchedule,
deleteSchedule,
toggleSchedule,
};
});