From 7aebdb8c966f472383cf55e8da31e9655102e775 Mon Sep 17 00:00:00 2001 From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Date: Sat, 7 Jan 2023 21:26:13 +0530 Subject: [PATCH] fix: use schema from zod-utils (#225) fixes:- https://secure.helpscout.net/conversation/2117165409/2395 How to test? Create an event type with custom inputs GET Request on /event-types end point After:- Screenshot 2023-01-07 at 4 57 39 PM Signed-off-by: Udit Takkar --- lib/validations/event-type.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/validations/event-type.ts b/lib/validations/event-type.ts index 5836945abb..579793a446 100644 --- a/lib/validations/event-type.ts +++ b/lib/validations/event-type.ts @@ -1,6 +1,7 @@ import { z } from "zod"; -import { _EventTypeCustomInputModel, _EventTypeModel as EventType } from "@calcom/prisma/zod"; +import { _EventTypeModel as EventType } from "@calcom/prisma/zod"; +import { customInputSchema } from "@calcom/prisma/zod-utils"; import { Frequency } from "~/lib/types"; @@ -122,6 +123,6 @@ export const schemaEventTypeReadPublic = EventType.pick({ ) .nullable(), metadata: jsonSchema.nullable(), - customInputs: _EventTypeCustomInputModel.array().optional(), + customInputs: customInputSchema.array().optional(), }) );