BioDrop: [BUG] API should reduce the data returned
Description
On the userβs statistics page, we are retrieving all their daily stats from the API but only displaying the last 30 days pages/account/statistics.js
We should add a query parameter to the API so that we only retrieve the requested data api/account/statistics.js, default to 30 days
Screenshots
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 15 (7 by maintainers)
The limit could always be added in another issue/pull request - it has no limit now, so we are still moving forwards and making improvements by adding a default of 30
hey @Dun-sin , yes you are correct π
Currently it is done in the UI here https://github.com/EddieHubCommunity/BioDrop/blob/42a9e1fd6d653a5b9df63971209f575bcd398b61/pages/account/statistics.js#L88 but we should be able to remove this limit as the backend API function should only return 30 by default, note is it not a
findOnebut afindhttps://github.com/EddieHubCommunity/BioDrop/blob/42a9e1fd6d653a5b9df63971209f575bcd398b61/pages/api/account/statistics.js#L39Yes π I was thinking to have no limit, but if you are able to add a max limit of 365, that would be great π―
Also be aware of the changes in this PR in the UI https://github.com/EddieHubCommunity/BioDrop/pull/8580