Skip to content

refactor: Shared Pagination Utility Extractor (#199)#241

Merged
Sulex45 merged 2 commits into
stellarkit-lab-devtools:mainfrom
AnnabelJoe:feat/199-pagination-utility
Jun 8, 2026
Merged

refactor: Shared Pagination Utility Extractor (#199)#241
Sulex45 merged 2 commits into
stellarkit-lab-devtools:mainfrom
AnnabelJoe:feat/199-pagination-utility

Conversation

@AnnabelJoe

Copy link
Copy Markdown
Contributor

Extract the limit, order, and cursor query parameter handling into a single reusable pagination utility to eliminate repetition and ensure consistent behaviour across all paginated endpoints.

Changes:

  • Created src/utils/pagination.js with parsePaginationParams
  • Updated src/routes/account.js, src/routes/asset.js, and src/routes/transactions.js
  • No behavior changes for valid inputs; invalid inputs now consistently return 400 ValidationError

Closes #199

)

Extract limit, order, and cursor parsing logic into a central utility at src/utils/pagination.js. Updated all paginated endpoints to use this utility, ensuring consistent validation and reducing code duplication.
@Sulex45 Sulex45 merged commit c4c30ac into stellarkit-lab-devtools:main Jun 8, 2026
1 of 3 checks 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.

Shared Pagination Utility Extractor

2 participants