2
0

🦴 Add theme page backbone

This commit is contained in:
Baptiste Arnaud
2021-12-23 09:37:42 +01:00
parent 6ee0647384
commit 30ddb143b4
35 changed files with 784 additions and 87 deletions

View File

@ -1,4 +1,4 @@
import { StartBlock, StepType } from 'bot-engine'
import { BackgroundType, StartBlock, StepType, Theme } from 'bot-engine'
import { Typebot, User } from 'db'
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
@ -38,8 +38,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
},
],
}
const theme: Theme = {
general: {
font: 'Open Sans',
background: { type: BackgroundType.NONE, content: '#ffffff' },
},
}
const typebot = await prisma.typebot.create({
data: { ...data, ownerId: user.id, startBlock },
data: { ...data, ownerId: user.id, startBlock, theme },
})
return res.send(typebot)
}