1
0
Fork 0

remove unused /:filename endpoint

This commit is contained in:
Ryan Mwangi 2024-10-19 17:37:10 +03:00
parent ae0d41dca4
commit 42bfb3bdd2
1 changed files with 0 additions and 7 deletions

View File

@ -121,13 +121,6 @@ function saveCalendarData(calendarId, calendars) {
}); });
fs.writeFileSync(CALENDARS_FILE, JSON.stringify(calendarsData, null, 2)); fs.writeFileSync(CALENDARS_FILE, JSON.stringify(calendarsData, null, 2));
} }
// Serve the merged calendar file
app.get('/:filename', (req, res) => {
const filename = req.params.filename;
res.setHeader('Content-Type', 'text/calendar');
res.sendFile(filename, { root: '.' });
});
// Function to update the merged calendar // Function to update the merged calendar
async function updateMergedCalendar(){ async function updateMergedCalendar(){
try { try {