From f29124866c58cca95e8219a5f2c495ca7e5935b7 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Wed, 18 May 2022 15:23:18 +0200 Subject: [PATCH] fix: recurring and metadata as jsonSchema on read too --- lib/validations/event-type.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/validations/event-type.ts b/lib/validations/event-type.ts index 944ab837ae..3357c53794 100644 --- a/lib/validations/event-type.ts +++ b/lib/validations/event-type.ts @@ -85,4 +85,12 @@ export const schemaEventTypeReadPublic = EventType.pick({ currency: true, slotInterval: true, successRedirectUrl: true, -}).partial(); + description: true, +}) + .merge( + z.object({ + recurringEvent: jsonSchema.nullable(), + metadata: jsonSchema.nullable(), + }) + ) + .strict();