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: {
|
params: {
|
||||||
token: user.resetPasswordToken,
|
token: user.resetPasswordToken,
|
||||||
webAppUrl: appConfig.webAppUrl,
|
webAppUrl: appConfig.webAppUrl,
|
||||||
|
fullName: user.fullName,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
Hello {{ email }},
|
Hello {{ fullName }},
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@@ -10,16 +10,11 @@ export const worker = new Worker(
|
|||||||
async (job) => {
|
async (job) => {
|
||||||
const { email, subject, template, params } = job.data;
|
const { email, subject, template, params } = job.data;
|
||||||
|
|
||||||
const emailTemplateParams = {
|
|
||||||
...params,
|
|
||||||
email,
|
|
||||||
}
|
|
||||||
|
|
||||||
await mailer.sendMail({
|
await mailer.sendMail({
|
||||||
to: email,
|
to: email,
|
||||||
from: appConfig.fromEmail,
|
from: appConfig.fromEmail,
|
||||||
subject: subject,
|
subject: subject,
|
||||||
html: compileEmail(template, emailTemplateParams),
|
html: compileEmail(template, params),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
{ connection: redisConfig }
|
{ connection: redisConfig }
|
||||||
|
Reference in New Issue
Block a user