diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-29 10:04:53 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-29 15:18:48 -0400 |
commit | 149c72cf8c136781864863bf71ae3bf0d516728d (patch) | |
tree | fd128e9ce31f2f2c2afd6657478e91cb92a6fade /webapp/utils/async_client.jsx | |
parent | fcd8f2e2badc0d314eaba2f1e0360274e0ba9e24 (diff) | |
download | chat-149c72cf8c136781864863bf71ae3bf0d516728d.tar.gz chat-149c72cf8c136781864863bf71ae3bf0d516728d.tar.bz2 chat-149c72cf8c136781864863bf71ae3bf0d516728d.zip |
Added ability to regenerate outgoing webhook tokens on InstalledIntegrations page
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r-- | webapp/utils/async_client.jsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 93eeee351..cc19baa7e 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -1243,3 +1243,18 @@ export function deleteOutgoingHook(id) { } ); } + +export function regenOutgoingHookToken(id) { + client.regenOutgoingHookToken( + {id}, + (data) => { + AppDispatcher.handleServerAction({ + type: ActionTypes.UPDATED_OUTGOING_WEBHOOK, + outgoingWebhook: data + }); + }, + (err) => { + dispatchError(err, 'regenOutgoingHookToken'); + } + ); +} |