Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add pagination capabilities with middleware #34

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

GMishx
Copy link
Member

@GMishx GMishx commented Jan 11, 2024

Add new middleware to handle pagination.

Handle pagination for /licenses, /obligations and /audits endpoints.

Also update the PaginationMeta to contain the Totalpages, Page, Limit, Previous and Next information.

To merge after #32

@GMishx GMishx requested review from ag4ums, avinal and k-avy January 11, 2024 10:23
@GMishx GMishx marked this pull request as ready for review January 11, 2024 12:44
@GMishx GMishx force-pushed the feat/api/pagination branch 2 times, most recently from 2091f31 to 25e903e Compare January 12, 2024 08:43
@GMishx GMishx force-pushed the feat/api/pagination branch from 25e903e to 3939211 Compare January 12, 2024 08:50
Copy link
Member

@avinal avinal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest looks good to me.

pkg/models/types.go Show resolved Hide resolved
Copy link
Member

@avinal avinal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GMishx GMishx merged commit 079cf3a into main Jan 31, 2024
5 checks passed
@GMishx GMishx deleted the feat/api/pagination branch January 31, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants