2
0

fix(editor): 🐛 subscribe unsub zapier

This commit is contained in:
Baptiste Arnaud
2022-03-01 07:55:20 +01:00
parent dc510100e5
commit 4630512b8b
3 changed files with 24 additions and 5 deletions

View File

@ -24,7 +24,10 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const { webhookId } = typebot.blocks
.find(byId(blockId))
?.steps.find(byId(stepId)) as WebhookStep
await prisma.webhook.update({ where: { id: webhookId }, data: { url } })
await prisma.webhook.update({
where: { id: webhookId },
data: { url, body: '{{state}}' },
})
return res.send({ message: 'success' })
} catch (err) {