Move email '*.pug' templates in 'templates' folder

This commit is contained in:
Wolfgang Huß 2022-11-29 13:40:08 +01:00
parent 8afe0aaf3b
commit 88cae0e528
17 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ export const sendEmailTranslated = async (params: {
// ATTENTION: await is needed, because otherwise on send the email gets send in the language of the current user, because below the language gets reset // ATTENTION: await is needed, because otherwise on send the email gets send in the language of the current user, because below the language gets reset
await email await email
.send({ .send({
template: path.join(__dirname, params.template), template: path.join(__dirname, 'templates', params.template),
message: params.receiver, message: params.receiver,
locals: params.locals, // the 'locale' in here seems not to be used by 'email-template', because it doesn't work if the language isn't set before by 'i18n.setLocale' locals: params.locals, // the 'locale' in here seems not to be used by 'email-template', because it doesn't work if the language isn't set before by 'i18n.setLocale'
}) })