florianholzapfel/express-restify-mongoose — pull request #3 by nothingbuttumbleweed (2013-06-16 11:05:39+00:00)
Title: cleanQuery method before the middleware is called

The part on the buildQuery method that cleans the querystring from parameters that doesn't belong to the model has been moved to the first position of the middleware. This is to permit modification of the querystring in the middleware functions in case of user scope restrictions or other.

Now, if I want to modify the query in the middleware I can add objects to "req.query".