Skip to content

Commit 41aeb83

Browse files
committed
update pr
1 parent 0f31543 commit 41aeb83

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

packages/features/calendar-subscription/adapters/AdaptersFactory.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export class DefaultAdapterFactory implements AdapterFactory {
6565
* @returns
6666
*/
6767
getGenericCalendarSuffixes(): string[] {
68-
return this.getProviders().flatMap((provider) => GENERIC_CALENDAR_SUFFIXES[provider]);
68+
return Object.keys(GENERIC_CALENDAR_SUFFIXES).flatMap(
69+
(provider) => GENERIC_CALENDAR_SUFFIXES[provider as CalendarSubscriptionProvider]
70+
);
6971
}
7072
}

packages/features/selectedCalendar/repositories/SelectedCalendarRepository.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ISelectedCalendarRepository } from "@calcom/features/selectedCalen
22
import type { PrismaClient } from "@calcom/prisma";
33
import type { Prisma } from "@calcom/prisma/client";
44

5-
export class SelectedCalendarRepository implements ISelectedCalendarRepository {
5+
export class PrismaSelectedCalendarRepository implements ISelectedCalendarRepository {
66
constructor(private prismaClient: PrismaClient) {}
77

88
async findById(id: string) {
@@ -38,9 +38,11 @@ export class SelectedCalendarRepository implements ISelectedCalendarRepository {
3838
},
3939
},
4040
},
41-
AND: genericCalendarSuffixes?.map((suffix) => ({
42-
NOT: { externalId: { endsWith: suffix } },
43-
})),
41+
AND: genericCalendarSuffixes?.length
42+
? genericCalendarSuffixes?.map((suffix) => ({
43+
NOT: { externalId: { endsWith: suffix } },
44+
}))
45+
: undefined,
4446
},
4547
take,
4648
});

0 commit comments

Comments
 (0)