Skip to content

Scheduling infrastructure for absolutely everyone.

fix event type valdiations

Agusti Fernandez Pardoeea7c1148801
diff --git a/lib/types.ts b/lib/types.ts
index 257568d551b..b5d9ac46635 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -142,13 +142,15 @@ interface EventTypeExtended extends Omit<EventType, "recurringEvent" | "location
freq?: Frequency | undefined;
until?: Date | undefined;
tzid?: string | undefined;
- };
- locations: {
- link?: string | undefined;
- address?: string | undefined;
- hostPhoneNumber?: string | undefined;
- type: DefaultLocationType | AppStoreLocationType;
- }[];
+ } | null;
+ locations:
+ | {
+ link?: string | undefined;
+ address?: string | undefined;
+ hostPhoneNumber?: string | undefined;
+ type: DefaultLocationType | AppStoreLocationType;
+ }[]
+ | null;
}
// EventType
diff --git a/lib/validations/event-type.ts b/lib/validations/event-type.ts
index 4d4c2446fde..b67f13fa6a7 100644
--- a/lib/validations/event-type.ts
+++ b/lib/validations/event-type.ts
@@ -103,8 +103,7 @@ export const schemaEventTypeReadPublic = EventType.pick({
tzid: timeZone.optional(),
})
.optional()
- .nullable()
- .or(z.null()),
+ .nullable(),
locations: z
.array(
z.object({