[#46] Update messages on delete application

This commit is contained in:
Jannis Mattheis 2018-04-14 12:25:56 +02:00 committed by Jannis Mattheis
parent 9f5ed344f4
commit 881e66ea29
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,10 @@ export function fetchApps() {
* @param {int} id the application id
*/
export function deleteApp(id) {
axios.delete(config.get('url') + 'application/' + id).then(fetchApps).then(() => snack('Application deleted'));
axios.delete(config.get('url') + 'application/' + id).then(() => {
fetchApps();
dispatcher.dispatch({type: 'DELETE_MESSAGES', payload: id});
}).then(() => snack('Application deleted'));
}
/**