Skip to content

Commit

Permalink
Merge pull request #330 from pagopa/fix-default-values-for-email-vali…
Browse files Browse the repository at this point in the history
…dation

fix: add default values for validated and taken fields
  • Loading branch information
shadowsheep1 authored Dec 6, 2023
2 parents f3c8fdf + 5eabdb0 commit 3c06b16
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/payloads/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 3c06b16

Please sign in to comment.