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.jsx35
1 files changed, 26 insertions, 9 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index bf117b3b3..7ce1346f9 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -442,16 +442,16 @@ export function inviteMembers(data, success, error) {
track('api', 'api_teams_invite_members');
}
-export function updateTeamDisplayName(data, success, error) {
+export function updateTeam(team, success, error) {
$.ajax({
- url: '/api/v1/teams/update_name',
+ url: '/api/v1/teams/update',
dataType: 'json',
contentType: 'application/json',
type: 'POST',
- data: JSON.stringify(data),
+ data: JSON.stringify(team),
success,
- error: function onError(xhr, status, err) {
- var e = handleError('updateTeamDisplayName', xhr, status, err);
+ error: (xhr, status, err) => {
+ var e = handleError('updateTeam', xhr, status, err);
error(e);
}
});
@@ -589,21 +589,38 @@ export function updateChannel(channel, success, error) {
track('api', 'api_channels_update');
}
-export function updateChannelDesc(data, success, error) {
+export function updateChannelHeader(data, success, error) {
+ $.ajax({
+ url: '/api/v1/channels/update_header',
+ dataType: 'json',
+ contentType: 'application/json',
+ type: 'POST',
+ data: JSON.stringify(data),
+ success,
+ error: function onError(xhr, status, err) {
+ var e = handleError('updateChannelHeader', xhr, status, err);
+ error(e);
+ }
+ });
+
+ track('api', 'api_channels_header');
+}
+
+export function updateChannelPurpose(data, success, error) {
$.ajax({
- url: '/api/v1/channels/update_desc',
+ url: '/api/v1/channels/update_purpose',
dataType: 'json',
contentType: 'application/json',
type: 'POST',
data: JSON.stringify(data),
success,
error: function onError(xhr, status, err) {
- var e = handleError('updateChannelDesc', xhr, status, err);
+ var e = handleError('updateChannelPurpose', xhr, status, err);
error(e);
}
});
- track('api', 'api_channels_desc');
+ track('api', 'api_channels_purpose');
}
export function updateNotifyProps(data, success, error) {