Skip to content

Commit 02ddd4b

Browse files
author
joeldevelops
committed
Fully await all email sends
1 parent 84ed763 commit 02ddd4b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/core/src/api/auth/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class AuthService {
9191
}
9292

9393
// Send OTP to user via email
94-
sendOtpEmail(email, otp);
94+
await sendOtpEmail(email, otp);
9595

9696
return {};
9797
}
@@ -208,7 +208,7 @@ export class AuthService {
208208
.execute();
209209
});
210210

211-
sendWelcomeEmail(email);
211+
await sendWelcomeEmail(email);
212212
}
213213

214214
await db

packages/core/src/api/billing/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ export class BillingService {
356356
.execute();
357357

358358
for (const email of emails) {
359-
sendSubscriptionUpgradedEmail({
359+
await sendSubscriptionUpgradedEmail({
360360
email: email.email,
361361
workspaceName: workspace.name,
362362
oldSubscription,
@@ -495,7 +495,7 @@ export class BillingService {
495495
: "unknown";
496496

497497
for (const email of emails) {
498-
sendSubscriptionDowngradedEmail({
498+
await sendSubscriptionDowngradedEmail({
499499
email: email.email,
500500
workspaceName: workspace.name,
501501
oldSubscription,

packages/core/src/api/invitation/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class InvitationService {
6767
.executeTakeFirstOrThrow();
6868

6969
// Send the invitation email to the specified address
70-
sendInvitationEmail(
70+
await sendInvitationEmail(
7171
email,
7272
workspace.name,
7373
invitation.uuid,

0 commit comments

Comments
 (0)