forked from ryanmwangi/CalMerger
get rid of end point to refresh merged calender using the refresh button
This commit is contained in:
parent
8031333bce
commit
7c01cfc964
1 changed files with 1 additions and 14 deletions
13
server.js
13
server.js
|
@ -271,19 +271,6 @@ END:VEVENT
|
|||
}
|
||||
}
|
||||
|
||||
// Endpoint to refresh the merged calendar
|
||||
app.post('/refresh/:id', async (req, res) => {
|
||||
const calendarId = req.params.id;
|
||||
try {
|
||||
await updateMergedCalendars(calendarId);
|
||||
res.json({ message: `Merged calendar refreshed: ${calendarId}` });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
res.status(500).json({ error: `Failed to refresh merged calendar: ${calendarId}` });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Start the server
|
||||
const port = 3000;
|
||||
app.listen(port, () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue