fix: API build
parent
6c8c3de87c
commit
a53ea33168
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 || {});
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue