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:- 
<img width="1440" alt="Screenshot 2023-01-07 at 4 57 39 PM"
src="https://user-images.githubusercontent.com/53316345/211147930-1154f1ad-5309-4e9c-b2e0-164169717d47.png">

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
pull/9078/head
Udit Takkar 2023-01-07 21:26:13 +05:30 committed by GitHub
parent 2808b798df
commit 7aebdb8c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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(),
})
);