removed catch + moved email ressources to assets
RENAME
src/notification/email/mjml-components/button.mjml
src/assets/email/mjml-components/button.mjml
RENAME
src/notification/email/mjml-components/config.mjml
src/assets/email/mjml-components/config.mjml
RENAME
src/notification/email/mjml-components/footer.mjml
src/assets/email/mjml-components/footer.mjml
RENAME
src/notification/email/mjml-components/header.mjml
src/assets/email/mjml-components/header.mjml
RENAME
src/notification/email/mjml-components/table.mjml
src/assets/email/mjml-components/table.mjml
RENAME
src/notification/email/mjml-components/text1.mjml
src/assets/email/mjml-components/text1.mjml
RENAME
src/notification/email/mjml-components/title.mjml
src/assets/email/mjml-components/title.mjml
MODIFY
src/notification/email/email-component-manager/EmailComponentManager.ts
src/notification/email/email-component-manager/EmailComponentManager.ts
@@ -28,13 +28,8 @@ export default class EmailComponentManager {
}
public static async loadComponent(componentName: EmailComponent): Promise<string> {
- try {
- const fileName = `${global.appRoot}/notification/email/mjml-components/${componentName}`;
+ const fileName = `${global.appRoot}/assets/email/mjml-components/${componentName}`;
const content = await fs.readFile(fileName, 'utf8');
return content;
- } catch (error) {
- // Do not log that one - an exception is thrown by the caller when null is returned
- }
- return null;
}
}

removed catch + moved email ressources to assets