From c85b2ae3d993b713ca00e4f1ce163f831b80e4ab Mon Sep 17 00:00:00 2001 From: Jennie Robinson Faber Date: Sat, 23 May 2026 18:49:55 +0100 Subject: [PATCH] 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. --- server/utils/schemas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils/schemas.js b/server/utils/schemas.js index 322bbd4..84ccf96 100644 --- a/server/utils/schemas.js +++ b/server/utils/schemas.js @@ -61,7 +61,7 @@ export const helcimCreatePlanSchema = z.object({ export const helcimCustomerSchema = z.object({ name: z.string().min(1).max(200), 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(), agreedToGuidelines: z.literal(true) })