adds notifications to running queries
This commit is contained in:
parent
8713105b62
commit
d2790ddd19
|
@ -10,6 +10,6 @@ export const triggerAutomation = async (automationId, fields) => {
|
||||||
})
|
})
|
||||||
res.error
|
res.error
|
||||||
? notificationStore.danger("En error has occured")
|
? notificationStore.danger("En error has occured")
|
||||||
: notificationStore.success("Automation triggered.")
|
: notificationStore.success("Automation triggered")
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,14 @@ import API from "./api"
|
||||||
* Executes a query against an external data connector.
|
* Executes a query against an external data connector.
|
||||||
*/
|
*/
|
||||||
export const executeQuery = async ({ queryId, parameters }) => {
|
export const executeQuery = async ({ queryId, parameters }) => {
|
||||||
const response = await API.post({
|
const res = await API.post({
|
||||||
url: `/api/queries/${queryId}`,
|
url: `/api/queries/${queryId}`,
|
||||||
body: {
|
body: {
|
||||||
parameters,
|
parameters,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
res.error
|
||||||
|
? notificationStore.danger("En error has occured")
|
||||||
|
: notificationStore.success("Query successful")
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ export const deleteRows = async ({ tableId, rows }) => {
|
||||||
})
|
})
|
||||||
res.error
|
res.error
|
||||||
? notificationStore.danger("En error has occured")
|
? notificationStore.danger("En error has occured")
|
||||||
: notificationStore.success(`${rows.length} rows deleted.`)
|
: notificationStore.success(`${rows.length} row(s) deleted`)
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue