summaryrefslogtreecommitdiff
path: root/src/lib/handlebars.ts
diff options
context:
space:
mode:
authorINOUE Daisuke <inoue.daisuke@gmail.com>2025-05-03 22:38:45 +0900
committerINOUE Daisuke <inoue.daisuke@gmail.com>2025-05-03 22:38:45 +0900
commit861fff32a70c5631e3061fe3d68fbe83c9d9bc3b (patch)
tree6d677e86b42c78de3d72c78286db0481873123d5 /src/lib/handlebars.ts
parentd901c09ff606d9298fbefd7ecefb6dd3bfe22ac2 (diff)
parent69f75005303d634b9208c23068655385734f4d3a (diff)
Merge branch 'main' into feature/localization-again
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);
- },
- );
- });
-};