Merge pull request #89 from calcom/fix/hooks-dont-parse

fix: hooks dont parse before read
pull/9078/head
Agusti Fernandez Pardo 2022-05-20 21:32:07 +02:00 committed by GitHub
commit dbf4590ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ async function createOrlistAllWebhooks(
* description: No webhooks were found
*/
const data = await prisma.webhook.findMany({ where: { userId } });
const webhooks = data.map((webhook) => schemaWebhookReadPublic.parse(webhook));
if (webhooks) res.status(200).json({ webhooks });
// const webhooks = data.map((webhook) => schemaWebhookReadPublic.parse(webhook));
if (data) res.status(200).json({ webhooks: data });
else
(error: Error) =>
res.status(404).json({