From bb13476326b81191ba4aa854c25224638735272c Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Mon, 28 Mar 2016 16:17:17 -0400
Subject: Added delete buttons to InstalledIntegrations

---
 webapp/utils/async_client.jsx | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

(limited to 'webapp/utils/async_client.jsx')

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');
+        }
+    );
+}
-- 
cgit v1.2.3-1-g7c22

