forked from ryanmwangi/CalMerger
store merged calendar url in a file
This commit is contained in:
parent
1552cc2013
commit
e01c54e267
|
@ -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}`);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue