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

how sort is working #56

Open
kindlydodo opened this issue Jun 15, 2024 · 0 comments
Open

how sort is working #56

kindlydodo opened this issue Jun 15, 2024 · 0 comments

Comments

@kindlydodo
Copy link

Im using the example in the readme page (Example 2 with Sequelize ORM) for my project.

The sort functionality seems not to do anithyng in the pug template. Check this code:

a(href=paginate.href({ sort: 'name' })) Sort by name

this sends the query parm 'name' to the api, but express-paginate don't do anything with it? Do i need to implement dis by myself? E.g with

db.User.findAndCountAll({limit: req.query.limit, offset: req.skip, raw: true, order: [['name', 'ASC']] })

so i put the name param in the order param of sequelize.

if yes could you please complete the example?

Thank you!

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

2 participants