fix build errors

This commit is contained in:
tobias.bruckert@mcon-group.com committed 2026-03-06 19:48:19 +11:00
1 parent 6c421717f8
commit 08fd09f59b
1 file changed
+7 -4
+7 -4
View File
@@ -141,7 +141,7 @@ export class UserService implements IUserService {
message: "New user created", message: "New user created",
service: SERVICE_NAME, service: SERVICE_NAME,
method: "registerUser", method: "registerUser",
details: newUser.id, details: { userId: newUser.id },
}); });
delete newUser.profileImage; delete newUser.profileImage;
@@ -205,7 +205,7 @@ export class UserService implements IUserService {
message: "New user created by superadmin", message: "New user created by superadmin",
service: SERVICE_NAME, service: SERVICE_NAME,
method: "createUser", method: "createUser",
details: newUser.id, details: { userId: newUser.id },
}); });
newUser.profileImage = undefined; newUser.profileImage = undefined;
@@ -272,14 +272,17 @@ export class UserService implements IUserService {
await this.recoveryTokensRepository.deleteManyByEmail(email); await this.recoveryTokensRepository.deleteManyByEmail(email);
const recoveryToken = await this.recoveryTokensRepository.create(email); const recoveryToken = await this.recoveryTokensRepository.create(email);
const name = user.firstName; const name = user.firstName;
const { clientHost } = this.settingsService.getSettings(); const settings = this.settingsService.getSettings();
const url = `${clientHost}/set-new-password/${recoveryToken.token}`; const url = `${settings.clientHost!}/set-new-password/${recoveryToken.token}`;
const html = await this.emailService.buildEmail("passwordResetTemplate", { const html = await this.emailService.buildEmail("passwordResetTemplate", {
name, name,
email, email,
url, url,
}); });
if (!html) {
throw new Error("Failed to build password reset email HTML");
}
const msgId = await this.emailService.sendEmail(email, "Checkmate Password Reset", html); const msgId = await this.emailService.sendEmail(email, "Checkmate Password Reset", html);
return msgId; return msgId;
}; };