Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Admin/Dashboard.vue
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | export default { | ||||
axios.get('/api/v4/users', { params: { search: this.search } }) | axios.get('/api/v4/users', { params: { search: this.search } }) | ||||
.then(response => { | .then(response => { | ||||
if (response.data.count == 1) { | if (response.data.count == 1) { | ||||
this.$router.push({ name: 'user', params: { user: response.data.list[0].id } }) | this.$router.push({ name: 'user', params: { user: response.data.list[0].id } }) | ||||
return | return | ||||
} | } | ||||
if (response.data.message) { | if (response.data.message) { | ||||
this.$toastr('info', response.data.message) | this.$toast.info(response.data.message) | ||||
} | } | ||||
this.users = response.data.list | this.users = response.data.list | ||||
}) | }) | ||||
.catch(this.$root.errorHandler) | .catch(this.$root.errorHandler) | ||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> |