Skip to content

Add pagination metadata builder#62

Merged
Chucks1093 merged 11 commits into
accesslayerorg:mainfrom
Johnpii1:issue-44
Mar 27, 2026
Merged

Add pagination metadata builder#62
Chucks1093 merged 11 commits into
accesslayerorg:mainfrom
Johnpii1:issue-44

Conversation

@chiscookeke11
Copy link
Copy Markdown
Contributor

@chiscookeke11 chiscookeke11 commented Mar 27, 2026

Summary

closes #44

Added a shared, reusable offset-based pagination metadata builder: buildOffsetPaginationMeta, with explicit input/output types (OffsetPaginationMetaParams / OffsetPaginationMeta) and safety normalization for limit, offset, and total. This keeps the pagination metadata shape stable as { limit, offset, total, hasMore }.

Updated the creators list controller to use the new helper instead of inline hasMore/pagination object construction, reducing repeated metadata logic in list responses.

Updated the empty creators list response helper to also use the same pagination metadata builder, so empty and non-empty responses are built consistently through one shared path.

Testing

  • pnpm lint
  • pnpm build
  • pnpm exec prisma generate when schema or generated types changed

Checklist

  • Linked issue or backlog item
  • No secrets or live credentials added
  • Docs updated if setup or env changed
  • Change is scoped to one problem

@Chucks1093 Chucks1093 merged commit 453b98f into accesslayerorg:main Mar 27, 2026
1 check passed
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.

Add pagination metadata builder

3 participants