fix: correct template name in email worker

This commit is contained in:
Ali BARIN
2023-03-03 14:37:42 +00:00
parent f094da6a4b
commit d198eaa988

View File

@@ -8,13 +8,13 @@ import appConfig from '../config/app';
export const worker = new Worker(
'email',
async (job) => {
const { email, subject, templateName, params } = job.data;
const { email, subject, template, params } = job.data;
await mailer.sendMail({
to: email,
from: appConfig.fromEmail,
subject: subject,
html: compileEmail(templateName, params),
html: compileEmail(template, params),
});
},
{ connection: redisConfig }