summaryrefslogtreecommitdiffstats
path: root/webapp/utils/async_client.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r--webapp/utils/async_client.jsx30
1 files changed, 30 insertions, 0 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index 9ca2bd606..93eeee351 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -1213,3 +1213,33 @@ export function addOutgoingHook(hook, success, error) {
}
);
}
+
+export function deleteIncomingHook(id) {
+ client.deleteIncomingHook(
+ {id},
+ () => {
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.REMOVED_INCOMING_WEBHOOK,
+ id
+ });
+ },
+ (err) => {
+ dispatchError(err, 'deleteIncomingHook');
+ }
+ );
+}
+
+export function deleteOutgoingHook(id) {
+ client.deleteOutgoingHook(
+ {id},
+ () => {
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.REMOVED_OUTGOING_WEBHOOK,
+ id
+ });
+ },
+ (err) => {
+ dispatchError(err, 'deleteOutgoingHook');
+ }
+ );
+}