diff options
author | =Corey Hulen <corey@hulen.com> | 2015-10-19 11:42:40 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-10-19 11:42:40 -0700 |
commit | 36658c13a4c7ebdfff22b8570e0db52bfa4de000 (patch) | |
tree | dc27373b42b8fe2a5f8ae88191924f27c361afb6 /web/react/utils/client.jsx | |
parent | 097d17bf2c4e07a153beb80afb15a546f291a418 (diff) | |
parent | d139c9e825d0149329d90684ebe2d6b31a728b16 (diff) | |
download | chat-36658c13a4c7ebdfff22b8570e0db52bfa4de000.tar.gz chat-36658c13a4c7ebdfff22b8570e0db52bfa4de000.tar.bz2 chat-36658c13a4c7ebdfff22b8570e0db52bfa4de000.zip |
Fixing merge conflicts
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r-- | web/react/utils/client.jsx | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 3130e9277..ee1f9ad27 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -1182,3 +1182,61 @@ export function savePreferences(preferences, success, error) { } }); } + +export function addOutgoingHook(hook, success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/create', + dataType: 'json', + contentType: 'application/json', + type: 'POST', + data: JSON.stringify(hook), + success, + error: (xhr, status, err) => { + var e = handleError('addOutgoingHook', xhr, status, err); + error(e); + } + }); +} + +export function deleteOutgoingHook(data, success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/delete', + dataType: 'json', + contentType: 'application/json', + type: 'POST', + data: JSON.stringify(data), + success, + error: (xhr, status, err) => { + var e = handleError('deleteOutgoingHook', xhr, status, err); + error(e); + } + }); +} + +export function listOutgoingHooks(success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/list', + dataType: 'json', + type: 'GET', + success, + error: (xhr, status, err) => { + var e = handleError('listOutgoingHooks', xhr, status, err); + error(e); + } + }); +} + +export function regenOutgoingHookToken(data, success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/regen_token', + dataType: 'json', + contentType: 'application/json', + type: 'POST', + data: JSON.stringify(data), + success, + error: (xhr, status, err) => { + var e = handleError('regenOutgoingHookToken', xhr, status, err); + error(e); + } + }); +} |