forked from ryanmwangi/CalMerger
filter out failed requests
This commit is contained in:
parent
c5b6fbaaaf
commit
fa2dd50beb
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ app.post('/merge', async (req, res) => {
|
|||
});
|
||||
|
||||
const results = await Promise.all(promises);
|
||||
// Filter out any failed requests
|
||||
const validResults = results.filter((result) => result !== null);
|
||||
|
||||
// Parse calendar data
|
||||
const cal1 = ical.parseICS(cal1Data.data);
|
||||
|
|
Loading…
Add table
Reference in a new issue