Hi
I have a database collection that includes the user_id against every object.
I use a list service to return a list of objects from the database to display to the user.
The problem is that my list service returns every piece of data in the database rather than only data belonging to the logged in user.
I do not want to use the query service and there is alot of code down stream against my list service that i don't want to have to re do as its taken me serveral months and this is the last challenge to sort so i need my solution to work against the LIST service.
I have tried variations of the following in the before send mapping but have had no luck.
//var whereObject = {"User": value};
//return JSON.stringify(whereObject);
return '{User: "' + value + '" }';
// var whereObject = {
// User_id: {"$inQuery": {User: "' + value + '" } }
// };
// return JSON.stringify(whereObject);
But nothing seems to filter out the results by user
Please advise