diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-04-04 00:18:04 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-04-03 21:18:04 -0700 |
commit | 348374fba5db8415d37d5cd8b897048b1300f415 (patch) | |
tree | 8277c9be4b8032b488e2fe87ceee58a283569a3e /webapp/client/client.jsx | |
parent | 4c9019b9eb789152439ad6a56e93c7f0fb7832c5 (diff) | |
download | chat-348374fba5db8415d37d5cd8b897048b1300f415.tar.gz chat-348374fba5db8415d37d5cd8b897048b1300f415.tar.bz2 chat-348374fba5db8415d37d5cd8b897048b1300f415.zip |
PLT-6098 Added Manage Teams modal to System Console users list (#5914)
* Added Manage Teams modal to System Console users list
* Localized ManageTeamsModal
* Fixed borders between Manage Teams list items
* Updated appearance of ManageTeamsModal
* Fixed admin being redirected from system console when removing self from a team
* Sorted teams in ManageTeamsModal
* Updated Manage Teams styling
Diffstat (limited to 'webapp/client/client.jsx')
-rw-r--r-- | webapp/client/client.jsx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx index 1f2e5517f..1f70300e8 100644 --- a/webapp/client/client.jsx +++ b/webapp/client/client.jsx @@ -550,6 +550,16 @@ export default class Client { end(this.handleResponse.bind(this, 'getAllTeamListings', success, error)); } + getTeamsForUser(userId, success, error) { + // Call out to API v4 since this call doesn't exist in v3 + request. + get(`${this.url}/api/v4/users/${userId}/teams`). + set(this.defaultHeaders). + type('application/json'). + accept('application/json'). + end(this.handleResponse.bind(this, 'getTeamsForUser', success, error)); + } + getMyTeam(success, error) { request. get(`${this.getTeamNeededRoute()}/me`). @@ -586,6 +596,16 @@ export default class Client { end(this.handleResponse.bind(this, 'getMyTeamMembers', success, error)); } + getTeamMembersForUser(userId, success, error) { + // Call out to API v4 since this call doesn't exist in v3 + request. + get(`${this.url}/api/v4/users/${userId}/teams/members`). + set(this.defaultHeaders). + type('application/json'). + accept('application/json'). + end(this.handleResponse.bind(this, 'getTeamsForUser', success, error)); + } + getMyTeamsUnread(teamId, success, error) { let url = `${this.getTeamsRoute()}/unread`; @@ -1275,6 +1295,16 @@ export default class Client { this.trackEvent('api', 'api_users_update_profile_picture'); } + getProfilePictureUrl(id, lastPictureUpdate) { + let url = `${this.getUsersRoute()}/${id}/image`; + + if (lastPictureUpdate) { + url += `?time=${lastPictureUpdate}`; + } + + return url; + } + // Channel Routes Section createChannel(channel, success, error) { |