diff options
author | Gavin Mogan <git@gavinmogan.com> | 2025-04-23 17:27:55 -0700 |
---|---|---|
committer | Gavin Mogan <git@gavinmogan.com> | 2025-04-23 17:43:37 -0700 |
commit | a8a17443c2d070d2d23920ffff7e4a43c905698c (patch) | |
tree | cddb37a6af4a65f774863e51be941cd291af5683 /src/routes/magicLink.ts | |
parent | aace2c7e6ccb6e74df83faac74c427d43bfaf79b (diff) |
Refactor for everywhere to use sendEmailFromTemplate everywhere
* Created a singleton to house handlebars so req doesn't need to be
passed everywhere (should make unit testing easier later)
* Subjectline for sendgrid and nodemailer are both always prefixed in
sendEmail()
* removed prefix subjectline from all other email places
* added a couple if (!event) { return 404 } to help make typescript
happy
* some minor eslint auto fixes (looks like let => const where it can)
Diffstat (limited to 'src/routes/magicLink.ts')
-rw-r--r-- | src/routes/magicLink.ts | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/routes/magicLink.ts b/src/routes/magicLink.ts index b4afca6..8d0f147 100644 --- a/src/routes/magicLink.ts +++ b/src/routes/magicLink.ts @@ -54,12 +54,8 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => { `Magic link to create an event`, "createEventMagicLink", { - token, - siteName: res.locals.config?.general.site_name, - siteLogo: res.locals.config?.general.email_logo_url, - domain: res.locals.config?.general.domain, + token }, - req, ); res.render("createEventMagicLink", { ...frontendConfig(res), |