perf: When a Google access token is expired and can't be refreshed, w… (#10557)

This commit is contained in:
Alex van Andel authored and GitHub committed 2023-08-03 13:17:38 +01:00
1 parent 2de4abba65
commit 91af873db9
2 files changed
+18 -2

No files matched your search

+4 -1
View File
@@ -11,7 +11,10 @@ const getCalendarsEvents = async (
dateTo: string,
selectedCalendars: SelectedCalendar[]
): Promise<EventBusyDate[][]> => {
const calendarCredentials = withCredentials.filter((credential) => credential.type.endsWith("_calendar"));
const calendarCredentials = withCredentials
.filter((credential) => credential.type.endsWith("_calendar"))
// filter out invalid credentials - these won't work.
.filter((credential) => !credential.invalid);
const calendars = await Promise.all(calendarCredentials.map((credential) => getCalendar(credential)));
performance.mark("getBusyCalendarTimesStart");
const results = calendars.map(async (c, i) => {