summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r--web/react/utils/client.jsx16
1 files changed, 15 insertions, 1 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index e1c331aff..56c8c4b3e 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -839,7 +839,7 @@ export function getChannelExtraInfo(id, 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',
@@ -852,6 +852,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: 'POST',
+ 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,