load () {
this.$overlay(true)
const get = (type) => {
return this.$axios.get(`endpoint/${type}`)
.then((response) => {
this.count[type] = response.data.data.count
})
.catch((err) => {
console.error(err)
})
.then(() => {
return Promise.resolve()
})
}
Promise.all([
get('register'),
get('draft'),
get('verified'),
get('rejected'),
])
.then(() => {
this.$overlay(false)
})
},
Komentar