pull/9078/head
zomars 2022-12-08 16:34:09 -07:00
parent f3c5f9bc0c
commit c129586336
2 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ import type { NextApiRequest } from "next";
import { defaultResponder } from "@calcom/lib/server"; import { defaultResponder } from "@calcom/lib/server";
import { membershipIdSchema } from "~/lib/validations/membership"; import { membershipIdSchema } from "~/lib/validations/membership";
import { schemaQueryIdAsString } from "~/lib/validations/shared/queryIdString";
/** /**
* @swagger * @swagger

View File

@ -46,7 +46,7 @@ import {
* description: Authorization information is missing or invalid. * description: Authorization information is missing or invalid.
*/ */
export async function patchHandler(req: NextApiRequest) { export async function patchHandler(req: NextApiRequest) {
const { prisma, query, userId, isAdmin } = req; const { prisma, query, isAdmin } = req;
const userId_integration_externalId = selectedCalendarIdSchema.parse(query); const userId_integration_externalId = selectedCalendarIdSchema.parse(query);
const { userId: bodyUserId, ...data } = schemaSelectedCalendarUpdateBodyParams.parse(req.body); const { userId: bodyUserId, ...data } = schemaSelectedCalendarUpdateBodyParams.parse(req.body);
const args: Prisma.SelectedCalendarUpdateArgs = { where: { userId_integration_externalId }, data }; const args: Prisma.SelectedCalendarUpdateArgs = { where: { userId_integration_externalId }, data };