Introduce bot v2 in builder (#328)

Also, the new engine is the default for updated typebots for viewer

Closes #211
This commit is contained in:
Baptiste Arnaud
2023-02-21 15:25:14 +01:00
committed by GitHub
parent 527dc8a5b1
commit debdac12ff
208 changed files with 4462 additions and 5236 deletions

View File

@@ -92,9 +92,13 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const updates = {
...omit(data, 'id', 'createdAt', 'updatedAt'),
version: '3',
theme: data.theme ?? undefined,
settings: data.settings ?? undefined,
resultsTablePreferences: data.resultsTablePreferences ?? undefined,
groups: data.groups ?? [],
variables: data.variables ?? [],
edges: data.edges ?? [],
} satisfies Prisma.TypebotUpdateInput
const updatedTypebot = await prisma.typebot.update({