Move instances of Client.deleteChannel() in components to an action (#5164)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
a8f35c5738
Коммит
dbfd93daa7
@@ -461,3 +461,23 @@ export function leaveChannel(channelId, success, error) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function deleteChannel(channelId, success, error) {
|
||||
Client.deleteChannel(
|
||||
channelId,
|
||||
() => {
|
||||
loadChannelsForCurrentUser();
|
||||
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
AsyncClient.dispatchError(err, 'handleDelete');
|
||||
|
||||
if (error) {
|
||||
error(err);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user