MCPcopy Create free account
hub / github.com/bugy/script-server / schedule

Function schedule

web-src/src/main-app/store/scriptSchedule.js:9–24  ·  view source on GitHub ↗
({state, commit, dispatch, rootState}, {scheduleSetup})

Source from the content-addressed store, hash-verified

7 namespaced: true,
8 actions: {
9 schedule({state, commit, dispatch, rootState}, {scheduleSetup}) {
10 const parameterValues = clone(rootState.scriptSetup.parameterValues);
11 const scriptName = rootState.scriptConfig.scriptConfig.name;
12
13 const formData = parametersToFormData(parameterValues);
14 formData.append('__script_name', scriptName);
15 formData.append('__schedule_config', JSON.stringify(scheduleSetup))
16
17 return axiosInstance.post('schedule', formData)
18 .catch(e => {
19 if (e.response.status === 422) {
20 e.userMessage = e.response.data;
21 }
22 throw e;
23 });
24 },
25 }
26}

Callers

nothing calls this directly

Calls 3

parametersToFormDataFunction · 0.90
appendMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected