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( export const worker = new Worker(
'email', 'email',
async (job) => { async (job) => {
const { email, subject, templateName, params } = job.data; const { email, subject, template, params } = job.data;
await mailer.sendMail({ await mailer.sendMail({
to: email, to: email,
from: appConfig.fromEmail, from: appConfig.fromEmail,
subject: subject, subject: subject,
html: compileEmail(templateName, params), html: compileEmail(template, params),
}); });
}, },
{ connection: redisConfig } { connection: redisConfig }