diff options
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/async_client.jsx | 15 | ||||
-rw-r--r-- | webapp/utils/constants.jsx | 1 |
2 files changed, 16 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'); + } + ); +} diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index 89bf4e865..c7f61e9df 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -74,6 +74,7 @@ export default { REMOVED_INCOMING_WEBHOOK: null, RECEIVED_OUTGOING_WEBHOOKS: null, RECEIVED_OUTGOING_WEBHOOK: null, + UPDATED_OUTGOING_WEBHOOK: null, REMOVED_OUTGOING_WEBHOOK: null, RECEIVED_MSG: null, |