refactor: improve error handling for failed emails

This commit is contained in:
Elias Schneider
2023-03-12 19:29:39 +01:00
parent 8ff417a013
commit 0ce8b528e1
2 changed files with 54 additions and 44 deletions

View File

@@ -29,7 +29,7 @@ export class UserSevice {
if (!dto.password) {
const randomPassword = crypto.randomUUID();
hash = await argon.hash(randomPassword);
this.emailService.sendInviteEmail(dto.email, randomPassword);
await this.emailService.sendInviteEmail(dto.email, randomPassword);
} else {
hash = await argon.hash(dto.password);
}