fix: dont add locations/metadata on create event type

pull/9078/head
Agusti Fernandez Pardo 2022-05-18 19:39:31 +02:00
parent eb03188d78
commit 5c97283aa1
1 changed files with 3 additions and 9 deletions

View File

@ -38,8 +38,8 @@ const schemaEventTypeCreateParams = z
slug: z.string(),
description: z.string().optional().nullable(),
length: z.number().int(),
locations: jsonSchema.optional().nullable().or(z.null()),
metadata: z.any().optional().nullable().or(z.null()),
// locations: jsonSchema.optional().nullable().or(z.null()),
// metadata: z.any().optional().nullable().or(z.null()),
recurringEvent: jsonSchema.optional().nullable().or(z.null()),
})
.strict();
@ -85,10 +85,4 @@ export const schemaEventTypeReadPublic = EventType.pick({
slotInterval: true,
successRedirectUrl: true,
description: true,
}).merge(
z.object({
locations: jsonSchema.optional().nullable().or(z.null()),
metadata: z.any().optional().nullable().or(z.null()),
recurringEvent: jsonSchema.optional().nullable().or(z.null()),
})
);
});