From edd3903ffb2b960e63225dcf09b55ef7d40a27b1 Mon Sep 17 00:00:00 2001 From: Ryderjj89 Date: Mon, 26 May 2025 15:53:51 -0400 Subject: [PATCH] Updated event conclusion message handling to ensure it is saved as null if not filled out, consistent with description field. --- backend/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 8531fb6..4264bfd 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -222,7 +222,7 @@ app.post('/api/events', upload.single('wallpaper'), async (req: MulterRequest, r emailNotificationsEnabled ? 1 : 0, email_recipients || '', eventConclusionEmailEnabled ? 1 : 0, // Save new field - event_conclusion_message || '' // Save new field + event_conclusion_message === undefined ? null : event_conclusion_message // Save new field ] ); @@ -994,4 +994,4 @@ app.listen(port, async () => { await connectToDatabase(); // Optionally run the task on startup for testing // sendConclusionEmails(); -}); \ No newline at end of file +});