parse-server
parse-server copied to clipboard
Accept default express parameters in middleware function.
Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
Issue
Currently, the middleware function does not accept the express default parameters
https://github.com/parse-community/parse-server/blob/4450ecbc01ab72544997f611e56d16878fc347ef/src/Options/index.js#L247-L248
However, the middleware is directly supplied to express in
https://github.com/parse-community/parse-server/blob/4450ecbc01ab72544997f611e56d16878fc347ef/src/ParseServer.js#L302-L310
So we should be able to pass req
,res
,next
parameters
Actual Outcome
Not able to pass the default express parameters req
,res
,next
to the middleware function
Expected Outcome
Should be able to pass req
,res
,next
parameters
Thanks for opening this issue!
- ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.
@mtrezza I guess we should be adding default parameters here?
Is this a bug or a feature request?
It should be classified as issue I think because we missed it during initial implementation
If Parse Server works as described then this would be a feature request. What is the functionality of Parse Server that is currently not working? I understand that "the middleware function does not accept the express default parameters", but that may be just an intended limitation, not a bug. The reason I'm asking is because a bug may be prioritized differently.
Server seems to be working fine. I needed to use a middleware, but due to the type of middleware being a function without any parameters, it was giving out an error.
Then this sounds like a feature request.
Then this sounds like a feature request.
Yea