Move instances of Client.deleteChannel() in components to an action (#5164)

Этот коммит содержится в:
Carlos Tadeu Panato Junior
2017-01-23 15:22:26 +01:00
коммит произвёл Joram Wilander
родитель a8f35c5738
Коммит dbfd93daa7
2 изменённых файлов: 22 добавлений и 12 удалений

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

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