logging: log result.data as I debug. correct synta as wellx
This commit is contained in:
parent
73135dd9d4
commit
1bb1db7326
|
@ -55,6 +55,7 @@ const createCalendarComponent = (name) => {
|
||||||
const addEventsToCalendar = (calendarComponent, results) => {
|
const addEventsToCalendar = (calendarComponent, results) => {
|
||||||
console.log(`Adding events to calendar component.`);
|
console.log(`Adding events to calendar component.`);
|
||||||
results.forEach((result) => {
|
results.forEach((result) => {
|
||||||
|
console.log(result.data);
|
||||||
const parsed = ICAL.parse(result.data);
|
const parsed = ICAL.parse(result.data);
|
||||||
const component = new ICAL.Component(parsed);
|
const component = new ICAL.Component(parsed);
|
||||||
|
|
||||||
|
@ -113,7 +114,7 @@ app.post('/merge', async (req, res) => {
|
||||||
|
|
||||||
res.json({ url: `${req.protocol}://${req.get('host')}/calendar/${sanitizedLinkGroupName}` });
|
res.json({ url: `${req.protocol}://${req.get('host')}/calendar/${sanitizedLinkGroupName}` });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error merging calendars:', erro.message);
|
console.error('Error merging calendars:', error.message);
|
||||||
res.status(500).json({ error: 'Failed to merge calendars' });
|
res.status(500).json({ error: 'Failed to merge calendars' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue