I have created a remote method in loopback
XXX.remoteMethod('getAllGlobalFilters', {
'description': 'List of all GlobalFilters',
'http': {
'path': '/getAllGlobalFilters',
'verb': 'get'
},
'accepts': [
{'arg': 'filter', 'type': 'object', 'http': {'source': 'query'}}
],
'returns': {'arg': 'allGlobalFilters', 'type': 'array'}
});
XXX.getAllGlobalFilters = function(arg, callback) {
console.log(arg);
rtbSspPubFilter.find({
where: {
type: 15
},
include: [{relation: 'XXX'}]
}, function(err, data) {
if (err) {
return callback(err);
}
return callback(null, data);
});
};
};
I am able to use find and the remote method is working fine but i am not able to use the regular expression like filtering in the remote method how do i access loop back default filters for the same.
I want to use the json like filters that is available for native loopback models. like the image above