PLT-5050 (WebApp): Change channel member roles. (#5076)
Admins can now Promote/Demote channel members in the Channel Manage Membersmodal.
Этот коммит содержится в:
коммит произвёл
enahum
родитель
2554ae4a25
Коммит
e15ae2253a
@@ -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) {
|
||||
|
||||
Ссылка в новой задаче
Block a user