export default {
async asyncData ({ params, error }) {
try {
const data = await get(`/api/${params.slug}`)
return { title: data.title }
} catch (e) {
error({ statusCode: 404, message: 'Not found' })
}
}
}
export default {
async asyncData ({ params, error }) {
try {
const data = await get(`/api/${params.slug}`)
return { title: data.title }
} catch (e) {
error({ statusCode: 404, message: 'Not found' })
}
}
}