From ced91e5bec2bb493bf7588f5a7d783bf7c9cbfa5 Mon Sep 17 00:00:00 2001 From: Eric Lim Date: Tue, 12 Nov 2024 17:16:38 +0100 Subject: [PATCH] feat(api): add BREVO_SELF_ACCOUNT_DELETION_TEMPLATE_ID env --- api/sample.env | 7 +++++++ api/src/shared/config.js | 1 + .../infrastructure/validate-environment-variables.js | 1 + 3 files changed, 9 insertions(+) diff --git a/api/sample.env b/api/sample.env index 2edb938dd5c..bf5178cceab 100644 --- a/api/sample.env +++ b/api/sample.env @@ -261,6 +261,13 @@ MAILING_PROVIDER=mailpit # default: none # BREVO_TARGET_PROFILE_NOT_CERTIFIABLE_TEMPLATE_ID= +# ID of the template used to notify the user about its account deletion +# +# presence: required only if emailing is enabled and provider is Brevo +# type: Number +# default: none +# BREVO_SELF_ACCOUNT_DELETION_TEMPLATE_ID= + # String for links in emails redirect to a specific domain when user comes from french domain # diff --git a/api/src/shared/config.js b/api/src/shared/config.js index 8b67a6ce18d..f3c8975ac4b 100644 --- a/api/src/shared/config.js +++ b/api/src/shared/config.js @@ -285,6 +285,7 @@ const configuration = (function () { organizationInvitationTemplateId: process.env.BREVO_ORGANIZATION_INVITATION_TEMPLATE_ID, organizationInvitationScoTemplateId: process.env.BREVO_ORGANIZATION_INVITATION_SCO_TEMPLATE_ID, passwordResetTemplateId: process.env.BREVO_PASSWORD_RESET_TEMPLATE_ID, + selfAccountDeletionTemplateId: process.env.BREVO_SELF_ACCOUNT_DELETION_TEMPLATE_ID, targetProfileNotCertifiableTemplateId: process.env.BREVO_TARGET_PROFILE_NOT_CERTIFIABLE_TEMPLATE_ID, }, }, diff --git a/api/src/shared/infrastructure/validate-environment-variables.js b/api/src/shared/infrastructure/validate-environment-variables.js index 07b59c4e7a3..6523da85ef3 100644 --- a/api/src/shared/infrastructure/validate-environment-variables.js +++ b/api/src/shared/infrastructure/validate-environment-variables.js @@ -8,6 +8,7 @@ const schema = Joi.object({ BREVO_ORGANIZATION_INVITATION_SCO_TEMPLATE_ID: Joi.number().optional(), BREVO_ORGANIZATION_INVITATION_TEMPLATE_ID: Joi.number().optional(), BREVO_PASSWORD_RESET_TEMPLATE_ID: Joi.number().optional(), + BREVO_SELF_ACCOUNT_DELETION_TEMPLATE_ID: Joi.number().optional(), CONTAINER_VERSION: Joi.string().optional(), CPF_EXPORTS_STORAGE_ACCESS_KEY_ID: Joi.string().optional(), CPF_EXPORTS_STORAGE_BUCKET_NAME: Joi.string().optional(),