Move instances of Client.updateUserRoles() in components to an action (#4657)

* moved updateUserRoles to user_actions

* updated second updateUserRoles call
Этот коммит содержится в:
Nick Frazier
2016-11-29 09:10:02 -05:00
коммит произвёл Joram Wilander
родитель ccf05bfdfe
Коммит ad52183248
2 изменённых файлов: 24 добавлений и 8 удалений

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

@@ -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);
}
}
);
}