0👍
Thank you for your answers. I had a friend take a look at it, and this was the result that worked for me.
async asyncData(context) {
const url = '/api/v1/products?popular=true&limit=8'
const data = await context.app.getAsyncData(url)
return { popularProducts: data.results ? data.results : [] }
}
Just wanted to post the answer.
Source:stackexchange.com