I am using apostrophe with apostrophe-headless. I have an apostrophe-pieces module called bundles, which I would like to filter based on a custom field. The documentation and it says that I need to define an apostrophe-pieces-pages module in order to enable that.
This is my configuration:
'bundles': {
extend: 'apostrophe-pieces',
name: 'bundles',
restApi: {
maxPerPage: 10,
}
},
'bundles-pages': {
extend: 'apostrophe-pieces-pages',
piecesFilters: [
{
name: 'name'
},
{
name: 'slug'
}
]
},
If I do full text search:
/api/v1/bundles?page=1&search=text
it works as expected, but if I try to filter on the slug:
/api/v1/bundles?page=1&slug=slug_value
it returns all bundles instead of the matching one.