summaryrefslogtreecommitdiff
path: root/src/routes/group.ts
diff options
context:
space:
mode:
authorGavin Mogan <git@gavinmogan.com>2025-04-23 17:27:55 -0700
committerGavin Mogan <git@gavinmogan.com>2025-04-23 17:43:37 -0700
commita8a17443c2d070d2d23920ffff7e4a43c905698c (patch)
treecddb37a6af4a65f774863e51be941cd291af5683 /src/routes/group.ts
parentaace2c7e6ccb6e74df83faac74c427d43bfaf79b (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/group.ts')
-rw-r--r--src/routes/group.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/routes/group.ts b/src/routes/group.ts
index 9f4105c..c63413e 100644
--- a/src/routes/group.ts
+++ b/src/routes/group.ts
@@ -101,11 +101,7 @@ router.post(
{
eventGroupID: eventGroup.id,
editToken: eventGroup.editToken,
- siteName: res.locals.config?.general.site_name,
- siteLogo: res.locals.config?.general.email_logo_url,
- domain: res.locals.config?.general.domain,
},
- req,
);
}
@@ -182,7 +178,7 @@ router.put(
}
// Token matches
// If there is a new image, upload that first
- let eventGroupID = req.params.eventGroupID;
+ const eventGroupID = req.params.eventGroupID;
let eventGroupImageFilename = eventGroup.image;
if (req.file?.buffer) {
Jimp.read(req.file.buffer)