mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-20 11:47:53 +02:00
Fix #90 - Blank page after deletion of all accounts
This commit is contained in:
parent
498ef39f88
commit
2c5da9b85e
@ -405,8 +405,13 @@
|
|||||||
let ids = []
|
let ids = []
|
||||||
this.selectedAccounts.forEach(id => ids.push(id))
|
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())
|
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
|
// we fetch the accounts again to prevent the js collection being
|
||||||
// desynchronize from the backend php collection
|
// desynchronize from the backend php collection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user