feat(api): default helcim customer circle to community when omitted
Lets the join form omit circle from the signup payload (circle picker moves to a post-signup prompt per docs/specs/join-form-redesign.md). Mongoose Member.circle is required with no default, so the Zod default fills it in before reaching the model.
This commit is contained in:
parent
5d4321612f
commit
c85b2ae3d9
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ export const helcimCreatePlanSchema = z.object({
|
||||||
export const helcimCustomerSchema = z.object({
|
export const helcimCustomerSchema = z.object({
|
||||||
name: z.string().min(1).max(200),
|
name: z.string().min(1).max(200),
|
||||||
email: z.string().trim().toLowerCase().email(),
|
email: z.string().trim().toLowerCase().email(),
|
||||||
circle: z.enum(['community', 'founder', 'practitioner']).optional(),
|
circle: z.enum(['community', 'founder', 'practitioner']).optional().default('community'),
|
||||||
contributionAmount: z.number().int().min(0).optional(),
|
contributionAmount: z.number().int().min(0).optional(),
|
||||||
agreedToGuidelines: z.literal(true)
|
agreedToGuidelines: z.literal(true)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue