PLT-5050 (WebApp): Change channel member roles. (#5076)

Admins can now Promote/Demote channel members in the Channel Manage
Membersmodal.
Этот коммит содержится в:
George Goldberg
2017-01-18 20:54:49 +00:00
коммит произвёл enahum
родитель 2554ae4a25
Коммит e15ae2253a
5 изменённых файлов: 159 добавлений и 33 удалений

Просмотреть файл

@@ -1530,6 +1530,21 @@ export default class Client {
this.track('api', 'api_channels_remove_member');
}
updateChannelMemberRoles(channelId, userId, newRoles, success, error) {
var data = {
user_id: userId,
new_roles: newRoles
};
request.
post(`${this.getChannelNeededRoute(channelId)}/update_member_roles`).
set(this.defaultHeaders).
type('application/json').
accept('application/json').
send(data).
end(this.handleResponse.bind(this, 'updateChannelMemberRoles', success, error));
}
// Routes for Commands
listCommands(success, error) {