({state, commit, dispatch, rootState}, {scheduleSetup})
| 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 | } |
nothing calls this directly
no test coverage detected