add html to signup endpoint

This commit is contained in:
2023-07-21 16:59:03 +02:00
parent a943838622
commit b7d87b2fef
4 changed files with 42 additions and 4 deletions

View File

@@ -35,10 +35,19 @@ export class CreateUserHandler implements ICommandHandler<CreateUserCommand> {
if (!createdUser) {
return null
}
if (!command.user.sendConfirmationEmail) {
return {
id: createdUser.id,
name: createdUser.name,
email: createdUser.email,
}
}
await this.usersService.sendConfirmationEmail({
email: createdUser.email,
name: createdUser.name,
verificationToken: verificationToken,
html: command.user.html,
subject: command.user.subject,
})
return {