Skip to content

Commit

Permalink
Fix #90 - Blank page after deletion of all accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubka committed Jun 20, 2022
1 parent 498ef39 commit 2c5da9b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions resources/js/views/Accounts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,14 @@
let ids = []
this.selectedAccounts.forEach(id => ids.push(id))
// Backend will delete all accounts at the same time
let that = this
await this.axios.delete('/api/v1/twofaccounts?ids=' + ids.join())
.then(response => {
ids.forEach(function(id) {
that.accounts = that.accounts.filter(a => a.id !== id)
})
})
// we fetch the accounts again to prevent the js collection being
// desynchronize from the backend php collection
this.fetchAccounts(true)
Expand Down

0 comments on commit 2c5da9b

Please sign in to comment.