feat: use full name instead of email address in emails

This commit is contained in:
Ali BARIN
2023-03-05 09:18:07 +00:00
parent ba19b50005
commit 4e46b16f7b
3 changed files with 3 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ const forgotPassword = async (_parent: unknown, params: Params) => {
params: {
token: user.resetPasswordToken,
webAppUrl: appConfig.webAppUrl,
fullName: user.fullName,
},
};

View File

@@ -5,7 +5,7 @@
</head>
<body>
<p>
Hello {{ email }},
Hello {{ fullName }},
</p>
<p>

View File

@@ -10,16 +10,11 @@ export const worker = new Worker(
async (job) => {
const { email, subject, template, params } = job.data;
const emailTemplateParams = {
...params,
email,
}
await mailer.sendMail({
to: email,
from: appConfig.fromEmail,
subject: subject,
html: compileEmail(template, emailTemplateParams),
html: compileEmail(template, params),
});
},
{ connection: redisConfig }