Add logging to backend event GET route
This commit is contained in:
@@ -139,6 +139,7 @@ app.get('/api/events/:slug', async (req: Request, res: Response) => {
|
||||
|
||||
// Parse needed_items from JSON string to array and boolean fields
|
||||
const event = rows[0];
|
||||
console.log('Raw event_conclusion_message from DB:', event.event_conclusion_message); // Add logging
|
||||
try {
|
||||
event.needed_items = event.needed_items ? JSON.parse(event.needed_items) : [];
|
||||
event.email_notifications_enabled = Boolean(event.email_notifications_enabled);
|
||||
@@ -989,4 +990,4 @@ app.listen(port, async () => {
|
||||
await connectToDatabase();
|
||||
// Optionally run the task on startup for testing
|
||||
// sendConclusionEmails();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user