keyshade-xyz / keyshade

Realtime secret and configuration management tool, with the best in class security and seamless integration support
https://keyshade.xyz
Mozilla Public License 2.0
196 stars 96 forks source link

feat(api): Add max page size #377

Closed DhairyaMajmudar closed 2 months ago

DhairyaMajmudar commented 2 months ago

Description

Adding max page size to 30

Fixes #160

Dependencies

N/A

Future Improvements

N/A

Mentions

@rajdip-b

Screenshots of relevant screens

N/A

Developer's checklist

If changes are made in the code:

Documentation Update

codiumai-pr-agent-free[bot] commented 2 months ago

Failed to generate code suggestions for PR

rajdip-b commented 2 months ago

image

You would also need to send in the max limit in here. I would say, create a util function name limit-max-items-per-page.ts and call that function across all the limits. This way, later on when we need to change the capacity, we only change the function and not all the code.

DhairyaMajmudar commented 2 months ago

For all the files I have the same comments:

* Get rid of `Number()` function

* Replace `limit: Number(limit),` with `limit: limitMaxItemsPerPage(limit),` in every `paginate` function call

sure, and I've to do any changes with page: Number(page), or that's correct ?