fix event type valdiations

This commit is contained in:
Agusti Fernandez Pardo
2022-05-28 01:50:28 +02:00
parent 2cd548bdb2
commit eea7c11488
2 changed files with 10 additions and 9 deletions
+9 -7
View File
@@ -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
+1 -2
View File
@@ -103,8 +103,7 @@ export const schemaEventTypeReadPublic = EventType.pick({
tzid: timeZone.optional(),
})
.optional()
.nullable()
.or(z.null()),
.nullable(),
locations: z
.array(
z.object({