From 69e98a51ec03bde22dcb763f9d71b3c6a49df477 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 6 Mar 2026 09:14:12 -0800 Subject: [PATCH] resolve ts errors --- server/src/service/business/userService.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/src/service/business/userService.ts b/server/src/service/business/userService.ts index fde9d6292..7cd1491c3 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; @@ -280,6 +280,14 @@ export class UserService implements IUserService { email, url, }); + if (!html) { + throw new AppError({ + message: "Failed to build password reset email HTML", + service: SERVICE_NAME, + method: "requestRecovery", + status: 500, + }); + } const msgId = await this.emailService.sendEmail(email, "Checkmate Password Reset", html); return msgId; };