Move instances of Client.updateUserNotifyProps() in components to an action (#5156)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
9b0ac63133
Коммит
efbaa1eb03
@@ -453,6 +453,24 @@ export function generateMfaSecret(success, error) {
|
||||
);
|
||||
}
|
||||
|
||||
export function updateUserNotifyProps(data, success, error) {
|
||||
Client.updateUserNotifyProps(
|
||||
data,
|
||||
() => {
|
||||
AsyncClient.getMe();
|
||||
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
if (error) {
|
||||
error(err);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function updateUserRoles(userId, newRoles, success, error) {
|
||||
Client.updateUserRoles(
|
||||
userId,
|
||||
|
||||
Ссылка в новой задаче
Block a user