Add logging to backend event GET route

This commit is contained in:
Ryderjj89
2025-05-26 14:44:14 -04:00
parent 8f8f19bcfe
commit 7f709660b0

View File

@@ -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();
});
});