From 08fd09f59b23cfad13442adb8af8978892db0cf5 Mon Sep 17 00:00:00 2001 From: "tobias.bruckert@mcon-group.com" <62531735+tb102122@users.noreply.github.com> Date: Fri, 6 Mar 2026 19:48:19 +1100 Subject: [PATCH] fix build errors --- server/src/service/business/userService.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/src/service/business/userService.ts b/server/src/service/business/userService.ts index fde9d6292..af845d6ad 100644 --- a/server/src/service/business/userService.ts +++ b/server/src/service/business/userService.ts @@ -141,7 +141,7 @@ export class UserService implements IUserService { message: "New user created", service: SERVICE_NAME, method: "registerUser", - details: newUser.id, + details: { userId: newUser.id }, }); delete newUser.profileImage; @@ -205,7 +205,7 @@ export class UserService implements IUserService { message: "New user created by superadmin", service: SERVICE_NAME, method: "createUser", - details: newUser.id, + details: { userId: newUser.id }, }); newUser.profileImage = undefined; @@ -272,14 +272,17 @@ export class UserService implements IUserService { await this.recoveryTokensRepository.deleteManyByEmail(email); const recoveryToken = await this.recoveryTokensRepository.create(email); const name = user.firstName; - const { clientHost } = this.settingsService.getSettings(); - const url = `${clientHost}/set-new-password/${recoveryToken.token}`; + const settings = this.settingsService.getSettings(); + const url = `${settings.clientHost!}/set-new-password/${recoveryToken.token}`; const html = await this.emailService.buildEmail("passwordResetTemplate", { name, email, url, }); + if (!html) { + throw new Error("Failed to build password reset email HTML"); + } const msgId = await this.emailService.sendEmail(email, "Checkmate Password Reset", html); return msgId; };