From 1bb1db73262a12e2185d5ee655ebc0898aef8f43 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Thu, 7 Nov 2024 20:37:23 +0300 Subject: [PATCH] logging: log result.data as I debug. correct synta as wellx --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 3c4c2a7..6b47159 100644 --- a/server.js +++ b/server.js @@ -55,6 +55,7 @@ const createCalendarComponent = (name) => { const addEventsToCalendar = (calendarComponent, results) => { console.log(`Adding events to calendar component.`); results.forEach((result) => { + console.log(result.data); const parsed = ICAL.parse(result.data); const component = new ICAL.Component(parsed); @@ -113,7 +114,7 @@ app.post('/merge', async (req, res) => { res.json({ url: `${req.protocol}://${req.get('host')}/calendar/${sanitizedLinkGroupName}` }); } catch (error) { - console.error('Error merging calendars:', erro.message); + console.error('Error merging calendars:', error.message); res.status(500).json({ error: 'Failed to merge calendars' }); } });