remove duplicated error check in event-types id
parent
12dbb0ad03
commit
e138df47ba
|
@ -97,7 +97,6 @@ export async function eventTypeById(req: NextApiRequest, res: NextApiResponse<Ev
|
|||
const safeQuery = schemaQueryIdParseInt.safeParse(query);
|
||||
const safeBody = schemaEventTypeBodyParams.safeParse(body);
|
||||
if (!safeQuery.success) throw new Error("Invalid request query", safeQuery.error);
|
||||
if (!safeQuery.success) throw new Error("Invalid request query", safeQuery.error);
|
||||
const userId = await getCalcomUserId(res);
|
||||
const data = await prisma.eventType.findMany({ where: { userId } });
|
||||
const userEventTypes = data.map((eventType) => eventType.id);
|
||||
|
|
Loading…
Reference in New Issue