System Information
- Strapi Version: 3.6.8
- Operating System: MacOS 11.6
- Database: PG 8.7.1 (prod) / SQLITE 5.0.0 (dev)
- Node Version: 16.13.0.
- NPM Version: 8.3.0
Hi! I need help
I need to consume a “browsing home” data from Strapi, similar to Netflix home, using Next.js (getServerSideProps + axios).
We’re calling the page structure shelf-lists, that contains relation with shelves (carroussels), that contains relation with contents (covers) with media.
So, I added this to shelf-list controller, and I getting Shelf-lists > Shelves > Contents, BUT without media fields.
module.exports = {
find: ctx => {
return strapi.query('shelf-list').find({ _limit: -1 }, ['shelves', 'shelves.contents']);
},
findOne: ctx => {
return strapi.query('shelf-list').find({ _limit: -1 }, ['shelves', 'shelves.contents']);
}
}
- Why?
- How can I get media data from nested filtering?