mv _id to _slug

This commit is contained in:
lesion 2021-11-11 16:56:27 +01:00
parent 49982ceb1d
commit 16762d9978
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -143,8 +143,8 @@ export default {
components: { EventAdmin, EmbedEvent },
async asyncData ({ $axios, params, error, store }) {
try {
const event = await $axios.$get(`/event/${params.id}`)
return { event, id: Number(params.id) }
const event = await $axios.$get(`/event/${params.slug}`)
return { event }
} catch (e) {
error({ statusCode: 404, message: 'Event not found' })
}