Skip to content

Commit b7e6682

Browse files
fix: make sure the email is in lowercase when updating profile (calcom#23568)
* feat: add zod schema for app metadata in config.json files - Create AppMetaSchema in packages/types/ that validates config.json structure against App interface - Integrate schema validation into build system's forEachAppDir function - Add support for all app variants including messaging, analytics, etc. - Validation failures show as warnings to maintain backward compatibility - Export schema from packages/types/index.ts for reuse - All existing config.json files now validate successfully Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * fix: remove validation logs and throw errors for invalid config.json files - Remove success log for validated config.json files - Throw validation errors instead of warnings with fallback - Addresses PR feedback on calcom#23568 Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * fix: restore try-catch block with error throwing for config validation - Keep try-catch structure for proper error handling - Remove success console.log as originally requested - Throw descriptive errors instead of console.warn - Addresses PR feedback to maintain error handling while stopping build on validation failures Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * fix: address CodeRabbit feedback - add passthrough and improve error handling - Add .passthrough() to AppMetaSchema and nested objects for backward compatibility - Wrap JSON.parse in try-catch with better error messages including file paths - Preserve unknown keys in config.json files to avoid breaking existing functionality - Addresses CodeRabbit review comments on calcom#23568 Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * refactor: remove index.ts and use direct import for AppMetaSchema - Remove packages/types/index.ts file as requested - Import AppMetaSchema directly from AppMetaSchema.ts file - Simplifies import structure while maintaining functionality - All config.json validation still works correctly Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * fix --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 472ffef commit b7e6682

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/modules/settings/my-account/profile-view.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,12 @@ const ProfileForm = ({
511511
.max(FULL_NAME_LENGTH_MAX_LIMIT, {
512512
message: t("max_limit_allowed_hint", { limit: FULL_NAME_LENGTH_MAX_LIMIT }),
513513
}),
514-
email: emailSchema,
514+
email: emailSchema.toLowerCase(),
515515
bio: z.string(),
516516
secondaryEmails: z.array(
517517
z.object({
518518
id: z.number(),
519-
email: emailSchema,
519+
email: emailSchema.toLowerCase(),
520520
emailVerified: z.union([z.string(), z.null()]).optional(),
521521
emailPrimary: z.boolean().optional(),
522522
})

0 commit comments

Comments
 (0)