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

Parsing of req.params would be nice #120

Open
martijnhiemstra opened this issue Sep 6, 2017 · 1 comment
Open

Parsing of req.params would be nice #120

martijnhiemstra opened this issue Sep 6, 2017 · 1 comment

Comments

@martijnhiemstra
Copy link

martijnhiemstra commented Sep 6, 2017

It would be nice if you could parse the parameters through the request parameters for example:

URL?page=2&limit=5

The code could be something like this:

var params = mongoose-paginate.parse(req.params)
Model.paginate({}, params).then(function(result) {
  // ...
});
@anthonyringoet
Copy link

I think express-paginate middleware is what you're looking for.

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

No branches or pull requests

2 participants