From 3faec06186cd55ae8d2def0c5a302e1755a50b3f Mon Sep 17 00:00:00 2001 From: Joshua Ryder Date: Tue, 7 Oct 2025 09:16:27 -0400 Subject: [PATCH] Notes saving fixes --- server/api/notes/download/[sermonId].get.ts | 4 +--- server/api/notes/email/[sermonId].post.ts | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/api/notes/download/[sermonId].get.ts b/server/api/notes/download/[sermonId].get.ts index b02e3bb..0580117 100644 --- a/server/api/notes/download/[sermonId].get.ts +++ b/server/api/notes/download/[sermonId].get.ts @@ -77,11 +77,9 @@ export default defineEventHandler(async (event) => { // Create formatted text content const textContent = ` ================================================================================ -New Life Christian Church +New Life Christian Church - SERMON NOTES ================================================================================ -SERMON NOTES - Title: ${sermon.title} Date: ${sermonDate} diff --git a/server/api/notes/email/[sermonId].post.ts b/server/api/notes/email/[sermonId].post.ts index f5b76c5..2d696e9 100644 --- a/server/api/notes/email/[sermonId].post.ts +++ b/server/api/notes/email/[sermonId].post.ts @@ -43,7 +43,8 @@ export default defineEventHandler(async (event) => { // Get user's notes const noteRecord = getSermonNote(user.id!, sermonId) - const userNotes = noteRecord?.notes || '' + // Convert line breaks to HTML breaks for email display + const userNotes = noteRecord?.notes ? noteRecord.notes.replace(/\n/g, '
') : '' // Format bible references for HTML email let bibleReferencesText = ''