fix: hooks dont parse before read

This commit is contained in:
Agusti Fernandez Pardo
2022-05-20 21:27:11 +02:00
parent 8c8235c3c7
commit f1175a06f6
+2 -2
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({