From f7211e3f87d4d337a3abdea25ac9f36b0ffe892f Mon Sep 17 00:00:00 2001 From: ztimson Date: Sun, 5 Jan 2025 21:00:21 -0500 Subject: [PATCH] Fix momentum session expired & sending emails --- src/components/contact.vue | 2 +- src/services/momentum.service.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/contact.vue b/src/components/contact.vue index 4b187f4..119ba93 100644 --- a/src/components/contact.vue +++ b/src/components/contact.vue @@ -34,7 +34,7 @@ function send(name: string, email: string, subject: string, message: string) { return momentum.email.send({ to: ['zaktimson@gmail.com', email], subject: `ZaksCode: ${subject}`, - body: {template: 'email', data: {body: `From: ${name} <${email}>

${message}`}} + body: `From: ${name} <${email}>

${message}` }); } diff --git a/src/services/momentum.service.ts b/src/services/momentum.service.ts index ec377d1..c62dbbb 100644 --- a/src/services/momentum.service.ts +++ b/src/services/momentum.service.ts @@ -29,3 +29,5 @@ export const momentum = new Momentum(environment.apiUrl, { socket: true }); momentum.client.inject(true); + +momentum.on('auth/session-expired', () => momentum.auth.logout());