1
0
Fork 0

filter out failed requests

This commit is contained in:
Ryan Mwangi 2024-10-02 02:09:36 +03:00
parent c5b6fbaaaf
commit fa2dd50beb
1 changed files with 2 additions and 0 deletions

View File

@ -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);