Confirm before account delete

This commit is contained in:
Bubka 2020-01-06 22:03:40 +01:00
parent 9e7ea7d0fb
commit 3350da4927

View File

@ -89,6 +89,7 @@
},
deleteAccount: function (id) {
if(confirm("Are you sure you want to delete this account?")) {
let token = localStorage.getItem('jwt')
axios.defaults.headers.common['Content-Type'] = 'application/json'
@ -98,6 +99,7 @@
this.accounts.splice(this.accounts.findIndex(x => x.id === id), 1);
})
}
}
},
beforeRouteEnter (to, from, next) {
if ( ! localStorage.getItem('jwt')) {