Skip to content
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

Incompatibility with express 5 #50

Open
stefanosala opened this issue Dec 13, 2018 · 3 comments
Open

Incompatibility with express 5 #50

stefanosala opened this issue Dec 13, 2018 · 3 comments

Comments

@stefanosala
Copy link

Hi everyone,
this is just to leave a note to everyone who's looking for this info. At the current state this module is not compatible with express 5, because they changed the req.query object in a getter, so this library is not able to add page and limit to it.
Cheers.

@niftylettuce
Copy link
Contributor

PR welcome to fix

@kedarchandrayan
Copy link

Hello @niftylettuce,

I would love to contribute here. Following is what I am thinking.

As req.query will be a getter from express 5 onwards, we will not be able to set anything in it. I will use req.paginate when we need to set page and limit after validation and sanitisation.

Please let me know if this approach seems good. I wanted to discuss first, before implementation as this might be a breaking change. Anyways, the package itself will become incompatible after express 5 release, so a breaking change might be the only way out. Please let me know your opinion.

Thanks,
Kedar Chandrayan

@kedarchandrayan
Copy link

Hello @niftylettuce,

Please let me know if I can raise a PR using the above approach.

Thanks,
Kedar Chandrayan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants