mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-27 05:43:42 +08:00
init
This commit is contained in:
24
frontend/src/composables/job/useJobUpdate.ts
Normal file
24
frontend/src/composables/job/useJobUpdate.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import client from "@/api/client";
|
||||
|
||||
export const useJobUpdate = () => {
|
||||
const updateCron = async (trigger: {
|
||||
triggerName: string;
|
||||
triggerGroup: string;
|
||||
cron: string;
|
||||
}) => {
|
||||
await client.PUT("/scheduler/job/update", {
|
||||
params: {
|
||||
query: {
|
||||
cron: trigger.cron,
|
||||
},
|
||||
},
|
||||
body: {
|
||||
name: trigger.triggerName,
|
||||
group: trigger.triggerGroup,
|
||||
},
|
||||
});
|
||||
};
|
||||
return {
|
||||
updateCron,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user