Skip to content

Commit

Permalink
fix: one more review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ludtkemorgan committed Jan 2, 2025
1 parent 5398746 commit 7e92b24
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions api/src/services/email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,17 @@ export class EmailService {

public async sendSingleSES(
mailOptions: {
to: string | string[];
to: string;
subject: string;
html: string;
text?: string;
},
useCase: string,
) {
if (Array.isArray(mailOptions.to) && mailOptions.to.length === 0) return;
try {
const toAddresses = Array.isArray(mailOptions.to)
? mailOptions.to
: [mailOptions.to];
const command = new aws.SendEmailCommand({
FromEmailAddress: SEND_FROM_EMAIL,
Destination: { ToAddresses: toAddresses },
Destination: { ToAddresses: [mailOptions.to] },
Content: {
Simple: {
Subject: {
Expand Down Expand Up @@ -417,7 +413,7 @@ export class EmailService {
{
to: user.email,
subject: `${singleUseCode} is your secure Partners Portal account access token`,
text: 'Text version',
text: `${singleUseCode} is your secure Partners Portal account access token`,
html: this.template('mfa-code')({
user: user,
mfaCodeOptions: { singleUseCode },
Expand Down

0 comments on commit 7e92b24

Please sign in to comment.