From d47b3287bdd594c78d1d3844695115f6f08936e1 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 16 Oct 2019 21:00:25 +0200 Subject: [PATCH] Fix user deletion for multiple users --- src/views/users/components/MultipleUsersMenu.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/users/components/MultipleUsersMenu.vue b/src/views/users/components/MultipleUsersMenu.vue index 2c6f630c..53f778b8 100644 --- a/src/views/users/components/MultipleUsersMenu.vue +++ b/src/views/users/components/MultipleUsersMenu.vue @@ -150,9 +150,9 @@ export default { }, methods: { mappers() { - const applyAction = (users, dispatchAction) => { + const applyAction = async(users, dispatchAction) => { try { - dispatchAction(users) + await dispatchAction(users) } catch (err) { console.log(err) return @@ -192,7 +192,7 @@ export default { }, remove: () => { const filtered = this.selectedUsers.filter(user => this.$store.state.user.id !== user.id) - const deleteAccountFn = async(user) => await this.$store.dispatch('DeleteUser', user) + const deleteAccountFn = async(users) => await this.$store.dispatch('DeleteUsers', users) applyAction(filtered, deleteAccountFn) },