Skip to content

feat: add shared boolean query flag parser#253

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Benedict315:main
Apr 28, 2026
Merged

feat: add shared boolean query flag parser#253
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Benedict315:main

Conversation

@Benedict315
Copy link
Copy Markdown
Contributor

Summary

Add a shared helper for parsing boolean-like query flags and apply it to creator list query parsing so boolean flags are handled consistently.

What Changed

  • added a shared boolean query parser for true, false, 1, and 0
  • added a Zod-friendly query helper for reusing that parser in endpoint schemas
  • updated creator list query parsing to use the shared helper for verified
  • aligned the standalone creator filter parser with the shared behavior
  • added focused tests for valid values and consistent validation errors

Validation

  • corepack pnpm exec jest src/utils/test/parseBoolean.utils.test.ts --runInBand
  • corepack pnpm exec ts-node src/modules/creators/creators.filter.test.ts
  • corepack pnpm exec ts-node src/modules/creators/creators.boolean-query.parse.test.ts
  • corepack pnpm build

Notes

  • invalid boolean-like query values now return a consistent validation error instead of silently coercing to false
  • accepted values are now scoped to true / false / 1 / 0

closes #226

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 28, 2026

@Benedict315 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

@Chucks1093 Chucks1093 merged commit 7de58c0 into accesslayerorg:main Apr 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 shared helper for parsing boolean-like query flags

2 participants