Skip to content

Commit

Permalink
fixed email recipients into ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
willi-li-am committed Jan 1, 2024
1 parent f528c89 commit 0de604c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ATLAS_URI=<YOUR_MONGO_ATLAS_URI_HERE>
MAILJET_API_KEY=<YOUR_MAILJET_API_KEY>
MAILJET_SECRET_KEY=<YOUR_MAILJET_SECRET_KEY>
FINANCE_EMAIL=<EMAIL_WHERE_YOU_WANT_TO_SEND_FROM>
EMAIL_RECIPIENTS=<EMAILS_TO_RECEIVE_SEPERATED_BY_COMMA_(NO_SPACE)>
CLIENT_URL=http://localhost:3000
```

Expand Down
2 changes: 1 addition & 1 deletion backend/emails/emails.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const currencyFormatter = new Intl.NumberFormat('en-CA', {
})

const getEmailToSection = async (reporter_id, recipients) => {
const emailToSet = new Set(['[email protected]'])
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
Expand Down

0 comments on commit 0de604c

Please sign in to comment.