Skip to content

Feat/creatorlist boundary guard#92

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
shogun444:feat/creatorlist-boundary-guard
Mar 28, 2026
Merged

Feat/creatorlist boundary guard#92
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
shogun444:feat/creatorlist-boundary-guard

Conversation

@shogun444
Copy link
Copy Markdown
Contributor

Summary

Adds a reusable guard to normalize creator list page values in public endpoints.

Changes

  • Introduced normalizeCreatorListPage in creator-list-page.guard.ts
  • Applied the guard in httpListCreators to normalize incoming page query values
  • Added a minimal unit test for page normalization behavior

Implementation Details

  • Guard is a pure, deterministic function with no side effects
  • Invalid or non-integer values fall back to a default page (1)
  • Page values are clamped within a safe range (min: 1, max: 100)
  • No changes made to pagination logic or response structure

Testing

  • Verified:
    • undefined and non-numeric values default to 1
    • values below minimum normalize to 1
    • values above maximum are clamped
    • valid page values remain unchanged

Notes

  • No breaking changes introduced
  • Behavior is consistent and reusable across creator list endpoints

Closes #86

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 28, 2026

@shogun444 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@shogun444 shogun444 force-pushed the feat/creatorlist-boundary-guard branch from 91e3179 to c27ce56 Compare March 28, 2026 20:05
@shogun444 shogun444 force-pushed the feat/creatorlist-boundary-guard branch from c27ce56 to 29e6974 Compare March 28, 2026 20:07
@Chucks1093 Chucks1093 merged commit beb82ec into accesslayerorg:main Mar 28, 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 creator list page boundary guard

2 participants