Add support for editing slash commands (#4335)

Этот коммит содержится в:
Brian Olecki
2016-11-15 10:43:16 -05:00
коммит произвёл enahum
родитель 1f241af48a
Коммит 6297922ab9
12 изменённых файлов: 942 добавлений и 0 удалений

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

@@ -1348,6 +1348,29 @@ export function addCommand(command, success, error) {
);
}
export function editCommand(command, success, error) {
Client.editCommand(
command,
(data) => {
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_COMMAND,
command: data
});
if (success) {
success(data);
}
},
(err) => {
if (error) {
error(err);
} else {
dispatchError(err, 'editCommand');
}
}
);
}
export function deleteCommand(id) {
Client.deleteCommand(
id,