linnovate/mean — pull request #917 by enkodellc (2014-11-25 21:58:03+00:00)
Title: Update Express req.status, validate MongoId parameters

2 Updates in this commit:
While testing I received a deprecated call:
deprecate res.json(status, obj) -- use res.status(status).json(obj) instead
https://github.com/strongloop/express/blob/master/History.md#470--2014-07-25

This updates these calls. Not much change to the core but helpful for the Articles.

Next change is a middleware validation for the params. I ran into an an when created a client side route where I had the list before the article by Id and it was passing 'list' as the server dumped a bad error as it was an invalid _id so I think there should be a validation on the parameter. I did not use the express-validator lib as that would require it to be injected into every package where as this is DRY and works for most server routes where it is expecting a single ObjectId as a parameter.