diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-28 16:17:17 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-29 15:18:48 -0400 |
commit | bb13476326b81191ba4aa854c25224638735272c (patch) | |
tree | 3c7e33af8ca5243aff5cfe1098c24a08f8805c7d /webapp/utils | |
parent | 3634b5bab55d16b4e30caa74d08db6a88e2dfbbf (diff) | |
download | chat-bb13476326b81191ba4aa854c25224638735272c.tar.gz chat-bb13476326b81191ba4aa854c25224638735272c.tar.bz2 chat-bb13476326b81191ba4aa854c25224638735272c.zip |
Added delete buttons to InstalledIntegrations
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/async_client.jsx | 30 | ||||
-rw-r--r-- | webapp/utils/constants.jsx | 3 |
2 files changed, 33 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'); + } + ); +} diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index 126324de8..89bf4e865 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -68,10 +68,13 @@ export default { RECEIVED_PREFERENCE: null, RECEIVED_PREFERENCES: null, RECEIVED_FILE_INFO: null, + RECEIVED_INCOMING_WEBHOOKS: null, RECEIVED_INCOMING_WEBHOOK: null, + REMOVED_INCOMING_WEBHOOK: null, RECEIVED_OUTGOING_WEBHOOKS: null, RECEIVED_OUTGOING_WEBHOOK: null, + REMOVED_OUTGOING_WEBHOOK: null, RECEIVED_MSG: null, |