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): Create a paginate method #379

Closed muntaxir4 closed 2 months ago

muntaxir4 commented 2 months ago

Description

Added common/paginate.ts and common/paginate.spec.ts under api. The paginate method takes totalCount, realtiveUrl, query and defaultQuery.

Fixes #345

Dependencies

Mention any dependencies/packages used

Future Improvements

Mention any improvements to be done in future related to any file/feature

Mentions

Mention and tag the people

Screenshots of relevant screens

1 Test Suite and 4 Test Cases are added. image Passes paginate unit tests. image

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

Hey bro! Looks like you've already added this in #382. I'm closing this PR and this issue to the other PR.

muntaxir4 commented 2 months ago

Actually #382 is branched from this. Every other pagination is dependent on this @rajdip-b

rajdip-b commented 2 months ago

Yeah, I understand that. Okay so lets do this. I'm merging this since it is not dependent on foss hack. And, you can use this in your other PRs.

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

Failed to generate code suggestions for PR

muntaxir4 commented 2 months ago

Yeah, I understand that. Okay so lets do this. I'm merging this since it is not dependent on foss hack. And, you can use this in your other PRs.

Yeah sure. Thanks

muntaxir4 commented 2 months ago

Yeah, I understand that. Okay so lets do this. I'm merging this since it is not dependent on foss hack. And, you can use this in your other PRs.

By the way, why this isn't in the foss hack? The parent issue has the label. :')

rajdip-b commented 2 months ago

Yeah, I understand that. Okay so lets do this. I'm merging this since it is not dependent on foss hack. And, you can use this in your other PRs.

By the way, why this isn't in the foss hack? The parent issue has the label. :')

Actually, since the feature implemented in this issue would be used by all the other issues, I marked it as non FOSS so that once the implementation is done I can quickly merge it. That way, others would be able to use this feature.