2
0

🦴 Add share page backbone

This commit is contained in:
Baptiste Arnaud
2021-12-23 15:20:21 +01:00
parent 79aede1f3f
commit 9a78a341d2
12 changed files with 217 additions and 4 deletions

View File

@ -22,6 +22,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
})
return res.send({ typebots })
}
if (req.method === 'PUT') {
const data = JSON.parse(req.body)
const typebots = await prisma.typebot.update({
where: { id },
data,
})
return res.send({ typebots })
}
if (req.method === 'PATCH') {
const data = JSON.parse(req.body)
const typebots = await prisma.typebot.update({