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

paginate should return empty data when there have a bigger `_page`, but return last page data now #1549

Open byronogis opened 4 months ago

byronogis commented 4 months ago

"json-server": "1.0.0-beta.0".

Like there have 7 data in posts, and send:

  1. /posts?_page=1&_per_page=5, that is normal.
  2. /posts?_page=2&_per_page=5, normal too.
  3. /posts?_page=3&_per_page=5, the response is not my expected, current is same with step 2, does there should got a empty array ?