From a8a17443c2d070d2d23920ffff7e4a43c905698c Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Wed, 23 Apr 2025 17:27:55 -0700 Subject: 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) --- pnpm-lock.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pnpm-lock.yaml') diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5139a4a..0ac81b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@sendgrid/helpers': + specifier: ^8.0.0 + version: 8.0.0 '@sendgrid/mail': specifier: ^6.5.5 version: 6.5.5 @@ -370,6 +373,10 @@ packages: resolution: {integrity: sha512-uRFEanalfss5hDsuzVXZ1wm7i7eEXHh1py80piOXjobiQ+MxmtR19EU+gDSXZ+uMcEehBGhxnb7QDNN0q65qig==} engines: {node: '>= 6.0.0'} + '@sendgrid/helpers@8.0.0': + resolution: {integrity: sha512-Ze7WuW2Xzy5GT5WRx+yEv89fsg/pgy3T1E3FS0QEx0/VvRmigMZ5qyVGhJz4SxomegDkzXv/i0aFPpHKN8qdAA==} + engines: {node: '>= 12.0.0'} + '@sendgrid/mail@6.5.5': resolution: {integrity: sha512-DSu8oTPI0BJFH60jMOG9gM+oeNMoRALFmdAYg2PIXpL+Zbxd7L2GzQZtmf1jLy/8UBImkbB3D74TjiOBiLRK1w==} engines: {node: '>=6.0.0'} @@ -2661,6 +2668,10 @@ snapshots: chalk: 2.4.2 deepmerge: 4.3.1 + '@sendgrid/helpers@8.0.0': + dependencies: + deepmerge: 4.3.1 + '@sendgrid/mail@6.5.5': dependencies: '@sendgrid/client': 6.5.5 -- cgit v1.2.3