shellhub-io/shellhub

bug: Set value of per_page on GET /api/devices, it dosn't work in version 0.16.0

bonnlee2024 opened this issue · 0 comments

Description

This bug exist in v0.16.0.

request url: http://{restApiUrl}/api/devices?page=1&per_page=2
It dosn't work while setting the per_page value.

Add a question: How to get the total number of devices. i need the total count to show total pages.
i find the "X-Total-Count" in header of response. Is the value for total number of devices by page?

Steps to Reproduce

  1. Request url. http://{restApiUrl}/api/devices?page=1&per_page=2
  2. you can see the result that contain more than 2 records.

Expected Behavior

return the item count by value of per_page.

Edition

Community

Version

0.16.0

Related Logs

No response

Related Code

No response

Additional Information

No response