diff --git a/src/payloads/profile.ts b/src/payloads/profile.ts index eadc38c0..b279f22d 100644 --- a/src/payloads/profile.ts +++ b/src/payloads/profile.ts @@ -45,9 +45,9 @@ const spidProfile: InitializedProfile = { family_name: profileAttrConfig.family_name, has_profile: true, is_inbox_enabled: true, - is_email_already_taken: profileAttrConfig.is_email_already_taken, + is_email_already_taken: profileAttrConfig.is_email_already_taken ?? false, is_email_enabled: true, - is_email_validated: profileAttrConfig.is_email_validated, + is_email_validated: profileAttrConfig.is_email_validated ?? true, is_webhook_enabled: true, name: profileAttrConfig.name, version: 1, @@ -72,8 +72,8 @@ const spidProfileFirstOnboarding: InitializedProfile = { is_inbox_enabled: false, is_webhook_enabled: false, is_email_enabled: true, - is_email_already_taken: profileAttrConfig.is_email_already_taken, - is_email_validated: profileAttrConfig.is_email_validated, + is_email_already_taken: profileAttrConfig.is_email_already_taken ?? false, + is_email_validated: profileAttrConfig.is_email_validated ?? true, name: profileAttrConfig.name, version: 0, date_of_birth: pipe( @@ -94,8 +94,8 @@ const cieProfile: InitializedProfile = { has_profile: true, is_inbox_enabled: true, is_email_enabled: true, - is_email_already_taken: profileAttrConfig.is_email_already_taken, - is_email_validated: profileAttrConfig.is_email_validated, + is_email_already_taken: profileAttrConfig.is_email_already_taken ?? false, + is_email_validated: profileAttrConfig.is_email_validated ?? true, is_webhook_enabled: true, name: profileAttrConfig.name, version: 1, @@ -117,8 +117,8 @@ const cieProfileFirstOnboarding: InitializedProfile = { family_name: profileAttrConfig.family_name, has_profile: true, is_email_enabled: true, - is_email_validated: profileAttrConfig.is_email_validated, - is_email_already_taken: profileAttrConfig.is_email_already_taken, + is_email_validated: profileAttrConfig.is_email_validated ?? true, + is_email_already_taken: profileAttrConfig.is_email_already_taken ?? false, is_inbox_enabled: false, is_webhook_enabled: false, name: profileAttrConfig.name,