Updated event conclusion message handling to ensure it is saved as null if not filled out, consistent with description field.
This commit is contained in:
@@ -222,7 +222,7 @@ app.post('/api/events', upload.single('wallpaper'), async (req: MulterRequest, r
|
|||||||
emailNotificationsEnabled ? 1 : 0,
|
emailNotificationsEnabled ? 1 : 0,
|
||||||
email_recipients || '',
|
email_recipients || '',
|
||||||
eventConclusionEmailEnabled ? 1 : 0, // Save new field
|
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();
|
await connectToDatabase();
|
||||||
// Optionally run the task on startup for testing
|
// Optionally run the task on startup for testing
|
||||||
// sendConclusionEmails();
|
// sendConclusionEmails();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user