mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Allow base Email override for standard emails (#5449)
* Make email template overrides work The ternary needs to be this way for custom email templates to be picked up. * Allow custom subject lines for emails Allow subject line to be passed into `inviteUser()` and `requestPasswordReset()` * Fix typo * Fix typo * eslint stuff * Update users.ts
This commit is contained in:
committed by
GitHub
parent
db101e9660
commit
faa3ca7a06
@@ -70,8 +70,8 @@ export class MailService {
|
||||
|
||||
private async renderTemplate(template: string, variables: Record<string, any>, system = false) {
|
||||
const resolvedPath = system
|
||||
? path.join(__dirname, 'templates', template + '.liquid')
|
||||
: path.resolve(env.EXTENSIONS_PATH, 'templates', template + '.liquid');
|
||||
? path.resolve(env.EXTENSIONS_PATH, 'templates', template + '.liquid')
|
||||
: path.join(__dirname, 'templates', template + '.liquid');
|
||||
|
||||
const templateString = await fse.readFile(resolvedPath, 'utf8');
|
||||
const html = await liquidEngine.parseAndRender(templateString, variables);
|
||||
|
||||
Reference in New Issue
Block a user