|
|
@ -78,11 +78,11 @@ const automationActions = store => ({ |
|
|
return state |
|
|
return state |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
trigger: async ({ automation }) => { |
|
|
trigger: async automation => { |
|
|
const { _id } = automation |
|
|
const { _id } = automation |
|
|
return await api.post(`/api/automations/${_id}/trigger`) |
|
|
return await api.post(`/api/automations/${_id}/trigger`) |
|
|
}, |
|
|
}, |
|
|
test: async ({ automation }, testData) => { |
|
|
test: async (automation, testData) => { |
|
|
const { _id } = automation |
|
|
const { _id } = automation |
|
|
const response = await api.post(`/api/automations/${_id}/test`, testData) |
|
|
const response = await api.post(`/api/automations/${_id}/test`, testData) |
|
|
const json = await response.json() |
|
|
const json = await response.json() |
|
|
|