From bbd93317a19564bb673e94868cb8b85beebfd367 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Mon, 28 Oct 2024 15:12:57 +0300 Subject: [PATCH] update the name of the saved separate JSON file --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index dc565e4..be81bda 100644 --- a/server.js +++ b/server.js @@ -103,10 +103,10 @@ END:VEVENT icalString += `END:VCALENDAR`; fs.writeFileSync(`${MERGED_CALENDARS_DIR}/${filename}`, icalString); - // Save the user input and generated ID in a separate JSON file + // Save the user input and sanitizedLinkGroupName in a separate JSON file saveCalendarData(sanitizedLinkGroupName, linkGroupName, calendars); - res.json({ url: `${req.protocol}://${req.get('host')}/calendar/${calendarId}` }); + res.json({ url: `${req.protocol}://${req.get('host')}/calendar/${sanitizedLinkGroupName}` }); } catch (error) { console.error(error); res.status(500).json({ error: 'Failed to merge calendars' });