@Component
})
export default class pageIndex extends mixins(MixinGeneral) {
private async asyncData({
$axios,
error,
}: {
$axios: NuxtAppOptions
route: NuxtAppOptions
error: any
}) {
try {
console.log('[ASYNCDATA] token:', $axios.defaults.headers.common.Authorization)
const response = await $axios.$get(filterUrl(INDEX_API))
return response
} catch (err) {
error({ statusCode: 404, message: 'Post not found' })
}
}
@Component
})
export default class pageIndex extends mixins(MixinGeneral) {
private async asyncData({
$axios,
error,
}: {
$axios: NuxtAppOptions
route: NuxtAppOptions
error: any
}) {
try {
console.log('[ASYNCDATA] token:', $axios.defaults.headers.common.Authorization)
const response = await $axios.$get(filterUrl(INDEX_API))
return response
} catch (err) {
error({ statusCode: 404, message: 'Post not found' })
}
}