fix: API build

pull/11303/head^2
zomars 2023-10-09 19:55:54 -07:00
parent 6c8c3de87c
commit a53ea33168
3 changed files with 5 additions and 1 deletions

View File

@ -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);

View File

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

View File

@ -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,