1
0
Fork 0

update the name of the saved separate JSON file

This commit is contained in:
Ryan Mwangi 2024-10-28 15:12:57 +03:00
parent 8531b4ce2b
commit bbd93317a1
1 changed files with 2 additions and 2 deletions

View File

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