Skip to content

feat(creator): normalize empty slug params#94

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
kryputh:feat/creator-slug-empty-normalizer
Mar 28, 2026
Merged

feat(creator): normalize empty slug params#94
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
kryputh:feat/creator-slug-empty-normalizer

Conversation

@kryputh
Copy link
Copy Markdown
Contributor

@kryputh kryputh commented Mar 28, 2026

Summary

  • add a narrow helper that normalizes empty-string creator slug input before route validation
  • reuse that helper directly in the creator profile params schema
  • keep behavior predictable by only converting exact empty-string values to undefined

Verification

  • pnpm build
  • pnpm exec eslint src/modules/creator/creator-slug-input.utils.ts src/modules/creator/creator-profile.schemas.ts
  • pnpm exec ts-node --transpile-only -e "const { CreatorProfileParamsSchema } = require('./src/modules/creator/creator-profile.schemas'); const empty = CreatorProfileParamsSchema.safeParse({ creatorId: '' }); const valid = CreatorProfileParamsSchema.safeParse({ creatorId: 'creator-slug' }); console.log(JSON.stringify({ emptySuccess: empty.success, emptyIssues: empty.success ? [] : empty.error.issues.map((issue) => ({ path: issue.path.join('.'), message: issue.message })), validSuccess: valid.success, validValue: valid.success ? valid.data.creatorId : null }, null, 2));"

Closes #84

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 28, 2026

@kryputh 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 09af1ce 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 slug empty-string normalizer

2 participants