fix: correct template name in email worker
This commit is contained in:
@@ -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 }
|
||||||
|
Reference in New Issue
Block a user