typicode / json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Other
72.67k stars 7.01k forks source link

Descending sort is not working #1496

Open AbhiBhattacharyya opened 8 months ago

AbhiBhattacharyya commented 8 months ago

Descending sort is not working

Tried with below URL with example schema in readme.

http://[localhost:3000/posts?_sort=id&_order=desc](http://localhost:3000/posts?_sort=id&_order=desc) Also

http://[localhost:3000/posts?_sort=id&_order=desc](http://localhost:3000/posts?_sort=id&_order=DESC)

Thanks Abhishek

typicode commented 8 months ago

Hi @AbhiBhattacharyya

Sort works differently in v1 https://github.com/typicode/json-server?tab=readme-ov-file#sort

vishal29meghwal commented 4 months ago

So, how is it solved ?