use vuex action
This commit is contained in:
parent
45e7f93c49
commit
36376ce57c
2 changed files with 9 additions and 8 deletions
|
@ -71,12 +71,7 @@ const ModerationTools = {
|
|||
}
|
||||
},
|
||||
toggleActivationStatus () {
|
||||
const store = this.$store
|
||||
const status = !!this.user.deactivated
|
||||
store.state.api.backendInteractor.toggleActivationStatus(this.user).then(response => {
|
||||
if (!response.ok) { return }
|
||||
store.commit('updateActivationStatus', { user: this.user, status: status })
|
||||
})
|
||||
this.$store.dispatch('toggleActivationStatus', this.user)
|
||||
},
|
||||
deleteUserDialog (show) {
|
||||
this.showDeleteUserDialog = show
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue