2
0

refactor(♻️ Add defaults everywhere (+ settings page)):

This commit is contained in:
Baptiste Arnaud
2022-01-25 18:19:37 +01:00
parent 21448bcc8a
commit c5aaa323d1
115 changed files with 1436 additions and 720 deletions

View File

@ -31,7 +31,11 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const data = JSON.parse(req.body)
const typebots = await prisma.typebot.update({
where: { id: typebotId },
data,
data: {
...data,
theme: data.theme ?? undefined,
settings: data.settings ?? undefined,
},
})
return res.send({ typebots })
}