forked from ryanmwangi/CalMerger
generate URL for merged calendar using calendar ID
This commit is contained in:
parent
84f4d4b855
commit
2d3c90aa38
|
@ -89,11 +89,11 @@ END:VEVENT
|
|||
`;
|
||||
});
|
||||
icalString += `END:VCALENDAR`;
|
||||
fs.writeFileSync(filename, icalString);
|
||||
fs.writeFileSync(`${MERGED_CALENDARS_DIR}/${filename}`, icalString);
|
||||
|
||||
|
||||
// Generate a unique URL for the merged calendar
|
||||
const mergedCalendarUrl = `${req.protocol}://${req.get('host')}/${filename}`;
|
||||
// Generate URL for the merged calendar
|
||||
const mergedCalendarUrl = `${req.protocol}://${req.get('host')}/calendar/${calendarId}`;
|
||||
|
||||
// Save the user input in a calendars.json file
|
||||
const calendarsFile = 'calendars.json';
|
||||
|
|
Loading…
Reference in New Issue