feat: Implement user invitation backend functionality

This commit is contained in:
Faruk AYDIN
2024-07-08 17:36:18 +02:00
parent 0e4ac3b7f3
commit 3c3e6e4144
13 changed files with 166 additions and 27 deletions

View File

@@ -6,7 +6,7 @@ import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const compileEmail = (emailPath, replacements = {}) => {
const filePath = path.join(__dirname, `../views/emails/${emailPath}.ee.hbs`);
const filePath = path.join(__dirname, `../views/emails/${emailPath}.hbs`);
const source = fs.readFileSync(filePath, 'utf-8').toString();
const template = handlebars.compile(source);
return template(replacements);