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

_sort=price&_order=asc no longer working #1541

Open
iamdebobrota opened this issue Apr 26, 2024 · 2 comments
Open

_sort=price&_order=asc no longer working #1541

iamdebobrota opened this issue Apr 26, 2024 · 2 comments

Comments

@iamdebobrota
Copy link

Its not support the _order query

@horizoncarlo
Copy link

I noticed this too. It's not hugely spelled out in the new 1.0-alpha docs, but the approach changed a bit: https://www.npmjs.com/package/json-server#sort

Basically for your example you'd use _sort=price for ascending, and _sort=-price for descending (note the dash prefix). No _order needed or used anymore from what I can see.

@AnyLifeZLB
Copy link

I have the same problem 😭

json-server --version
1.0.0-beta.0

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

3 participants