-
-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove mixinParams function and replace with req.param(...) #1
Comments
Hey bminer, thanks for your feedback! For validation I agree, we should be able to use req.param(). For sanitization however things will become a bit more tricky since we actually want to modify the parameters and req.param() is read-only. So we somehow have to figure out, whether the param we want to sanitize is in req.params, req.query or req.body and write it back to the correct location... Anyways I agree we should get rid of the mixinParams-method. If you want, you can provide me with a pull-request, otherwise I'll see if I can implement it during the weekend. |
Good point. I suppose you could just store back into req.param no matter I'm not too great with Git, and my time is extremely limited right now. I On Thu, Oct 20, 2011 at 8:50 AM, Christoph Tavan <
|
If you can wait until the end of the weekend, I'll implement your idea. |
…d req.body. req.check now no longer relies on req.mixinParams(), see #1
…) as well. Introduce new updateParam() method to replace params with the filtered version See #1
Thank you very much! Awesome |
Change lodash method names to match 4.x changes
Support for defining location of validation for each schema param.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The mixinParams function is not necessary because Express 2.0 already provides support for accessing route params, query strings, and HTTP bodies with req.param(...)
See http://expressjs.com/guide.html#req.param() for more information
This should clean up the code a bit. :)
The text was updated successfully, but these errors were encountered: