1
0
Fork 0

store merged calendar url in a file

This commit is contained in:
Ryan Mwangi 2024-10-08 22:04:31 +03:00
parent 1552cc2013
commit e01c54e267
1 changed files with 6 additions and 1 deletions

View File

@ -168,10 +168,15 @@ END:VEVENT
`; `;
}); });
icalString += `END:VCALENDAR`; icalString += `END:VCALENDAR`;
fs.writeFileSync(filename, icalString); fs.writeFileSync(filename, icalString);
// Generate a unique URL for the merged calendar // Generate a unique URL for the merged calendar
const mergedCalendarUrl = `${req.protocol}://${req.get('host')}/${filename}`; const mergedCalendarUrl = `${req.protocol}://${req.get('host')}/${filename}`;
// Store the merged calendar URL in a file
fs.writeFileSync(mergedCalendarUrlFile, mergedCalendarUrl);
console.log(`Merged calendar updated: ${mergedCalendarUrl}`); console.log(`Merged calendar updated: ${mergedCalendarUrl}`);