chore: switch templating engine away from mustache

This commit is contained in:
Meet
2024-10-04 08:08:36 +05:30
parent 5da6c12941
commit b416e79d63
3 changed files with 4 additions and 23 deletions
@@ -1,6 +1,6 @@
import ldapjs from "ldapjs";
import ldif from "ldif";
import mustache from "mustache";
import { compile } from "handlebars";
import { customAlphabet } from "nanoid";
import { z } from "zod";
@@ -40,7 +40,8 @@ const generateLDIF = ({
EncodedPassword: encodePassword(password)
};
const renderedLdif = mustache.render(ldifTemplate, data);
const renderTemplate = compile(ldifTemplate);
const renderedLdif = renderTemplate(data);
return renderedLdif;
};