diff --git a/server.js b/server.js index c4d2705..70b4874 100644 --- a/server.js +++ b/server.js @@ -221,6 +221,12 @@ END:VEVENT } } +// Endpoint to refresh the merged calendar +app.post('/refresh/:id', async (req, res) => { + const calendarId = req.params.id; + await updateMergedCalendars(calendarId); +}); + // Schedule a cron job to update the merged calendar every hour cron.schedule('1 * * * *', () => { console.log('Updating merged calendar...');