summaryrefslogtreecommitdiff
path: root/src/lib/handlebars.ts
diff options
context:
space:
mode:
authorRaphael Kabo <mail@raphaelkabo.com>2025-05-28 18:32:47 +0100
committerRaphael Kabo <mail@raphaelkabo.com>2025-05-28 18:32:47 +0100
commita6f8ec770d06ce33042ed3f222cba786897e0233 (patch)
treea060e72668de41fcbeae5e891ee86b096b096f26 /src/lib/handlebars.ts
parent08fa2f616c90e59066d0308097c65c424b5b4a88 (diff)
parentfd637b405c8784a07dabd54b10fda98ad9f4a4ad (diff)
Merge remote-tracking branch 'origin/main' into clearer-editing-mode
Diffstat (limited to 'src/lib/handlebars.ts')
-rw-r--r--src/lib/handlebars.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/lib/handlebars.ts b/src/lib/handlebars.ts
deleted file mode 100644
index d5a8b6e..0000000
--- a/src/lib/handlebars.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Request } from "express";
-
-export const renderTemplate = async (
- req: Request,
- templateName: string,
- data: Record<string, unknown>,
-): Promise<string> => {
- return new Promise<string>((resolve, reject) => {
- req.app
- .get("hbsInstance")
- .renderView(
- `./views/emails/${templateName}.handlebars`,
- data,
- (err: any, html: string) => {
- if (err) {
- console.error(err);
- reject(err);
- }
- resolve(html);
- },
- );
- });
-};