loopback access operation hook: add filter to count request

23 views
Skip to first unread message

Dan Krissell

unread,
Oct 14, 2016, 11:50:26 AM10/14/16
to LoopbackJS

I need to intercept my loopback queries before they query my Mongodb to add additional filters, for example, to limit the object to what the user has access to.


I can successfully update the query on access operation hook to add filters to the GET /Applications , where Applications is my object. However This fails to work for GET /Applications/count


The command runs with a 200, however it returns zero results, even though I'm adding the exact same filters. There most be something different about count that I'm missing. The ctx object looks have a ton of functions/objects in it. I'm only touching the query property, but there must be something else I need to do.


Any ideas? Thank you, Dan

Reply all
Reply to author
Forward
0 new messages