$Populate
1- You need to allow $populate at service level
module.exports = function (app) {
const Model = createModel(app);
const paginate = app.get('paginate');
const options = {
Model,
paginate,
whitelist: '$populate',
}
}2- You need to allow $populate at rule level
const options = {
Model,
paginate,
whitelist: '$populate',
serviceRules: [
{
'actions': ['manage'],
'roles': ['admin'],
'populateWhitelist': ['categories'] // Alow admin to populate categories
},
],
};3 - deep populate
rule example:
'$populate' examples:
request example:
simple Request example
4- Optional - Dashboard configuration-
Last updated
Was this helpful?