I'm using the Express + Nuxt.js starter template. My routes without params works just as they should, but my routes with params doesn't work as soon as I refresh the page - it'll return a 404 response.
I have tried with regular Promise
too.
My code is:
async asyncData({ params }) {
let { data } = await axios.get(`/api/product/${params.slug}`)
return { data: data.entries[0] }
},
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1969">#c1969</a>)</em></sub></div>