From 0de604c208124cabe185247d1bc6de4f3d8a002b Mon Sep 17 00:00:00 2001 From: William Li <52115161+Trollermaner@users.noreply.github.com> Date: Mon, 1 Jan 2024 13:31:23 -0500 Subject: [PATCH] fixed email recipients into ENV --- README.md | 1 + backend/emails/emails.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f61700a..1c72b5d 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ ATLAS_URI= MAILJET_API_KEY= MAILJET_SECRET_KEY= FINANCE_EMAIL= +EMAIL_RECIPIENTS= CLIENT_URL=http://localhost:3000 ``` diff --git a/backend/emails/emails.js b/backend/emails/emails.js index 0308f65..8e24ac8 100644 --- a/backend/emails/emails.js +++ b/backend/emails/emails.js @@ -15,7 +15,7 @@ const currencyFormatter = new Intl.NumberFormat('en-CA', { }) const getEmailToSection = async (reporter_id, recipients) => { - const emailToSet = new Set(['william.li@watonomous.ca']) + const emailToSet = new Set(process.env.EMAIL_RECIPIENTS?.split(',')) if (recipients.includes(EMAIL_RECIPIENTS.admin)) { // TODO: use ADMIN_IDENTIFIERS (rename to ADMIN_EMAILS) after migrating to new onboarding data