File tree Expand file tree Collapse file tree
calendar-subscription/adapters
selectedCalendar/repositories Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { ISelectedCalendarRepository } from "@calcom/features/selectedCalen
22import type { PrismaClient } from "@calcom/prisma" ;
33import 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 } ) ;
You can’t perform that action at this time.
0 commit comments