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 +});