mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Load and validate all config at startup (no-changelog) (#5283)
This commit is contained in:
committed by
GitHub
parent
b2f59c3f39
commit
72249e0de8
@@ -2,7 +2,6 @@ import { existsSync } from 'fs';
|
||||
import { readFile } from 'fs/promises';
|
||||
import Handlebars from 'handlebars';
|
||||
import { join as pathJoin } from 'path';
|
||||
import * as GenericHelpers from '@/GenericHelpers';
|
||||
import config from '@/config';
|
||||
import type {
|
||||
InviteEmailData,
|
||||
@@ -23,9 +22,7 @@ async function getTemplate(
|
||||
): Promise<Template> {
|
||||
let template = templates[templateName];
|
||||
if (!template) {
|
||||
const templateOverride = (await GenericHelpers.getConfigValue(
|
||||
`userManagement.emails.templates.${templateName}`,
|
||||
)) as string;
|
||||
const templateOverride = config.getEnv(`userManagement.emails.templates.${templateName}`);
|
||||
|
||||
let markup;
|
||||
if (templateOverride && existsSync(templateOverride)) {
|
||||
|
||||
Reference in New Issue
Block a user