mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-23 23:49:53 +01:00
Fix #90 - Blank page after deletion of all accounts
This commit is contained in:
parent
498ef39f88
commit
2c5da9b85e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user