mv _id to _slug
This commit is contained in:
@@ -143,8 +143,8 @@ export default {
|
|||||||
components: { EventAdmin, EmbedEvent },
|
components: { EventAdmin, EmbedEvent },
|
||||||
async asyncData ({ $axios, params, error, store }) {
|
async asyncData ({ $axios, params, error, store }) {
|
||||||
try {
|
try {
|
||||||
const event = await $axios.$get(`/event/${params.id}`)
|
const event = await $axios.$get(`/event/${params.slug}`)
|
||||||
return { event, id: Number(params.id) }
|
return { event }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error({ statusCode: 404, message: 'Event not found' })
|
error({ statusCode: 404, message: 'Event not found' })
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user