diff --git a/apps/api/pages/api/event-types/[id]/_patch.ts b/apps/api/pages/api/event-types/[id]/_patch.ts index f70bd28407..7c8fcd480a 100644 --- a/apps/api/pages/api/event-types/[id]/_patch.ts +++ b/apps/api/pages/api/event-types/[id]/_patch.ts @@ -209,6 +209,8 @@ export async function patchHandler(req: NextApiRequest) { hosts = [], bookingLimits, durationLimits, + /** FIXME: Updating event-type children from API not supported for now */ + children: _, ...parsedBody } = schemaEventTypeEditBodyParams.parse(body); diff --git a/apps/api/pages/api/event-types/_post.ts b/apps/api/pages/api/event-types/_post.ts index 075ed4c71a..f81af6171a 100644 --- a/apps/api/pages/api/event-types/_post.ts +++ b/apps/api/pages/api/event-types/_post.ts @@ -268,6 +268,8 @@ async function postHandler(req: NextApiRequest) { hosts = [], bookingLimits, durationLimits, + /** FIXME: Adding event-type children from API not supported for now */ + children: _, ...parsedBody } = schemaEventTypeCreateBodyParams.parse(body || {}); diff --git a/apps/api/pages/api/event-types/_utils/checkUserMembership.ts b/apps/api/pages/api/event-types/_utils/checkUserMembership.ts index df819bc95e..ad449b42b3 100644 --- a/apps/api/pages/api/event-types/_utils/checkUserMembership.ts +++ b/apps/api/pages/api/event-types/_utils/checkUserMembership.ts @@ -11,7 +11,7 @@ import { HttpError } from "@calcom/lib/http-error"; * if the event type doesn't belong to any team, * or if the user isn't a member of the associated team. */ -export default async function checkUserMembership(parentId: number, userId: number) { +export default async function checkUserMembership(parentId: number, userId?: number) { const parentEventType = await prisma.eventType.findUnique({ where: { id: parentId,