Merge pull request #87 from calcom/fix/add-console-events

fix: adds console log to debug event-types
pull/9078/head
Agusti Fernandez Pardo 2022-05-20 03:47:41 +02:00 committed by GitHub
commit 8ae59a5637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,10 @@ async function createOrlistAllEventTypes(
* 404:
* description: No event types were found
*/
const data = await prisma.eventType.findMany({ where: { userId } });
const data = await prisma.eventType
.findMany({ where: { userId } })
.catch((error) => res.status(404).json({ message: "No event types were found", error }));
console.log("eventTypes:", data);
// const event_types = data.map(
// async (eventType) => await schemaEventTypeReadPublic.safeParseAsync(eventType)
// );