Skip to content

Commit

Permalink
patch: send email async
Browse files Browse the repository at this point in the history
patch: send email async
  • Loading branch information
rajdip-b authored Jan 3, 2024
2 parents f0b0887 + 728256d commit 091e49b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/auth/service/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class AuthService {
this.OTP_EXPIRY
)

await this.resend.sendOtp(email, otp.code)
this.resend.sendOtp(email, otp.code)
this.logger.log(`Login code sent to ${email}: ${otp.code}`)
}

Expand Down
8 changes: 4 additions & 4 deletions apps/api/src/mail/services/mail.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class MailService implements IMailService {
</body>
</html>
`
await this.sendEmail(email, subject, body)
this.sendEmail(email, subject, body)
}

async projectInvitationMailForNonRegisteredUser(
Expand Down Expand Up @@ -72,7 +72,7 @@ export class MailService implements IMailService {
</body>
</html>
`
await this.sendEmail(email, subject, body)
this.sendEmail(email, subject, body)
}

async sendOtp(email: string, otp: string): Promise<void> {
Expand All @@ -95,7 +95,7 @@ export class MailService implements IMailService {
</body>
</html>
`
await this.sendEmail(email, subject, body)
this.sendEmail(email, subject, body)
}

private async sendEmail(
Expand All @@ -104,7 +104,7 @@ export class MailService implements IMailService {
body: string
): Promise<void> {
try {
await this.transporter.sendMail({
this.transporter.sendMail({
from: process.env.FROM_EMAIL,
to: email,
subject: subject,
Expand Down

0 comments on commit 091e49b

Please sign in to comment.