forked from ryanmwangi/CalMerger
filter out failed requests
This commit is contained in:
parent
c5b6fbaaaf
commit
fa2dd50beb
|
@ -37,6 +37,8 @@ app.post('/merge', async (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const results = await Promise.all(promises);
|
const results = await Promise.all(promises);
|
||||||
|
// Filter out any failed requests
|
||||||
|
const validResults = results.filter((result) => result !== null);
|
||||||
|
|
||||||
// Parse calendar data
|
// Parse calendar data
|
||||||
const cal1 = ical.parseICS(cal1Data.data);
|
const cal1 = ical.parseICS(cal1Data.data);
|
||||||
|
|
Loading…
Reference in New Issue