update the name of the saved separate JSON file
This commit is contained in:
parent
8531b4ce2b
commit
bbd93317a1
1 changed files with 2 additions and 2 deletions
|
@ -103,10 +103,10 @@ END:VEVENT
|
||||||
icalString += `END:VCALENDAR`;
|
icalString += `END:VCALENDAR`;
|
||||||
fs.writeFileSync(`${MERGED_CALENDARS_DIR}/${filename}`, icalString);
|
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);
|
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) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
res.status(500).json({ error: 'Failed to merge calendars' });
|
res.status(500).json({ error: 'Failed to merge calendars' });
|
||||||
|
|
Loading…
Add table
Reference in a new issue