feat: use full name instead of email address in emails
This commit is contained in:
@@ -32,6 +32,7 @@ const forgotPassword = async (_parent: unknown, params: Params) => {
|
||||
params: {
|
||||
token: user.resetPasswordToken,
|
||||
webAppUrl: appConfig.webAppUrl,
|
||||
fullName: user.fullName,
|
||||
},
|
||||
};
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Hello {{ email }},
|
||||
Hello {{ fullName }},
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@@ -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 }
|
||||
|
Reference in New Issue
Block a user