Move instances of Client.updateUserRoles() in components to an action (#4657)
* moved updateUserRoles to user_actions * updated second updateUserRoles call
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
ccf05bfdfe
Коммит
ad52183248
@@ -352,3 +352,22 @@ export function generateMfaSecret(success, error) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function updateUserRoles(userId, newRoles, success, error) {
|
||||
Client.updateUserRoles(
|
||||
userId,
|
||||
newRoles,
|
||||
() => {
|
||||
AsyncClient.getUser(this.props.user.id);
|
||||
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
if (error) {
|
||||
error(err);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user