Skip to content

Commit 214368a

Browse files
committed
auth: send the welcome email asynchronously
fixes #1244 Waiting for it increases the time to login and it is not essential to the login/registration process of the survey. If it fails, we'll know in the logs.
1 parent a9b44d9 commit 214368a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/evolution-backend/src/services/auth/participantAuthModel.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ class ParticipantAuthModel extends AuthModelBase<ParticipantModel> {
4848

4949
// Send a welcome email to the new user if the server is configured to do so
5050
if ((config.auth as any)?.welcomeEmail === true) {
51-
await sendWelcomeEmail(user);
51+
// Send welcome email, no need to wait for it
52+
sendWelcomeEmail(user);
5253
}
5354

5455
return user;

0 commit comments

Comments
 (0)