summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-23 12:49:28 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-23 12:49:28 -0700
commit1626a6de6f16ba0878160b0a7eae9f49b8d34d4f (patch)
treeabc9088402a783c2e1908fb2db93ad84731827dd /web/react/utils/client.jsx
parent9e04909c0a3672d27c148c931d82b225cc86dfe5 (diff)
downloadchat-1626a6de6f16ba0878160b0a7eae9f49b8d34d4f.tar.gz
chat-1626a6de6f16ba0878160b0a7eae9f49b8d34d4f.tar.bz2
chat-1626a6de6f16ba0878160b0a7eae9f49b8d34d4f.zip
PLT-349 adding team mgt to admin console
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r--web/react/utils/client.jsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index a19f58e61..63924bff2 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -347,6 +347,20 @@ export function testEmail(config, success, error) {
});
}
+export function getAllTeams(success, error) {
+ $.ajax({
+ url: '/api/v1/teams/all',
+ dataType: 'json',
+ contentType: 'application/json',
+ type: 'GET',
+ success,
+ error: function onError(xhr, status, err) {
+ var e = handleError('getAllTeams', xhr, status, err);
+ error(e);
+ }
+ });
+}
+
export function getMeSynchronous(success, error) {
var currentUser = null;
$.ajax({
@@ -890,6 +904,21 @@ export function getProfiles(success, error) {
});
}
+export function getProfilesForTeam(teamId, success, error) {
+ $.ajax({
+ cache: false,
+ url: '/api/v1/users/profiles/' + teamId,
+ dataType: 'json',
+ contentType: 'application/json',
+ type: 'GET',
+ success,
+ error: function onError(xhr, status, err) {
+ var e = handleError('getProfilesForTeam', xhr, status, err);
+ error(e);
+ }
+ });
+}
+
export function uploadFile(formData, success, error) {
var request = $.ajax({
url: '/api/v1/files/upload',