fix: event types validations recurring event and locations nullable:

pull/9078/head
Agusti Fernandez Pardo 2022-05-27 21:58:38 +02:00
parent 0b66e964fe
commit b9a2e0f4c6
1 changed files with 12 additions and 9 deletions

View File

@ -102,15 +102,18 @@ export const schemaEventTypeReadPublic = EventType.pick({
until: z.date().optional(),
tzid: timeZone.optional(),
})
.optional(),
locations: z.array(
z.object({
link: z.string().optional(),
address: z.string().optional(),
hostPhoneNumber: z.string().optional(),
type: z.nativeEnum(DefaultLocationType).or(z.nativeEnum(AppStoreLocationType)),
})
),
.optional()
.nullable(),
locations: z
.array(
z.object({
link: z.string().optional(),
address: z.string().optional(),
hostPhoneNumber: z.string().optional(),
type: z.nativeEnum(DefaultLocationType).or(z.nativeEnum(AppStoreLocationType)),
})
)
.nullable(),
metadata: jsonSchema.nullable(),
})
);