Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/User/ProfileDelete.vue
Show All 34 Lines | export default { | ||||
$('button.btn-secondary').focus() | $('button.btn-secondary').focus() | ||||
}, | }, | ||||
methods: { | methods: { | ||||
deleteProfile() { | deleteProfile() { | ||||
axios.delete('/api/v4/users/' + this.$store.state.authInfo.id) | axios.delete('/api/v4/users/' + this.$store.state.authInfo.id) | ||||
.then(response => { | .then(response => { | ||||
if (response.data.status == 'success') { | if (response.data.status == 'success') { | ||||
this.$root.logoutUser() | this.$root.logoutUser() | ||||
this.$toastr('success', response.data.message) | this.$toast.success(response.data.message) | ||||
} | } | ||||
}) | }) | ||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> |