forked from ryanmwangi/CalMerger
filter out any failed requests
This commit is contained in:
parent
08f9f5a15d
commit
d2d0f7fd1e
|
@ -141,6 +141,10 @@ app.get('/calendar/:name', async (req, res) => {
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const results = await Promise.all(promises);
|
||||||
|
// Filter out any failed requests
|
||||||
|
const validResults = results.filter((result) => result !== null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue