diff options
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r-- | web/react/utils/client.jsx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index d60fea872..9ff76f824 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -846,7 +846,7 @@ export function getChannelExtraInfo(id, memberLimit, success, error) { export function executeCommand(channelId, command, suggest, success, error) { $.ajax({ - url: '/api/v1/command', + url: '/api/v1/commands/execute', dataType: 'json', contentType: 'application/json', type: 'POST', @@ -859,6 +859,20 @@ export function executeCommand(channelId, command, suggest, success, error) { }); } +export function listCommands(success, error) { + $.ajax({ + url: '/api/v1/commands/list', + dataType: 'json', + contentType: 'application/json', + type: 'GET', + success, + error: function onError(xhr, status, err) { + var e = handleError('listCommands', xhr, status, err); + error(e); + } + }); +} + export function getPostsPage(channelId, offset, limit, success, error, complete) { $.ajax({ cache: false, |