From 881e66ea298e0429b56d60a9b66cd23e40c4c47f Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Sat, 14 Apr 2018 12:25:56 +0200 Subject: [PATCH] [#46] Update messages on delete application --- ui/src/actions/AppAction.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/actions/AppAction.js b/ui/src/actions/AppAction.js index bbe06a4..493aeae 100644 --- a/ui/src/actions/AppAction.js +++ b/ui/src/actions/AppAction.js @@ -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')); } /**