summaryrefslogtreecommitdiffstats
path: root/webapp/utils/async_client.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-28 16:17:17 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-29 15:18:48 -0400
commitbb13476326b81191ba4aa854c25224638735272c (patch)
tree3c7e33af8ca5243aff5cfe1098c24a08f8805c7d /webapp/utils/async_client.jsx
parent3634b5bab55d16b4e30caa74d08db6a88e2dfbbf (diff)
downloadchat-bb13476326b81191ba4aa854c25224638735272c.tar.gz
chat-bb13476326b81191ba4aa854c25224638735272c.tar.bz2
chat-bb13476326b81191ba4aa854c25224638735272c.zip
Added delete buttons to InstalledIntegrations
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');
+ }
+ );
+}