2
0

🗃️ Remove list types from db schema

This commit is contained in:
Baptiste Arnaud
2023-02-01 09:32:39 +01:00
parent 1806840119
commit 6e0f0e487b
10 changed files with 88 additions and 16 deletions

View File

@ -30,7 +30,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
await prisma.webhook.upsert({
where: { id: webhookId },
update: { url, body: '{{state}}', method: 'POST' },
create: { url, body: '{{state}}', method: 'POST', typebotId },
create: {
url,
body: '{{state}}',
method: 'POST',
typebotId,
headers: [],
queryParams: [],
},
})
return res.send({ message: 'success' })

View File

@ -29,7 +29,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
await prisma.webhook.upsert({
where: { id: webhookId },
update: { url, body: '{{state}}', method: 'POST' },
create: { url, body: '{{state}}', method: 'POST', typebotId },
create: {
url,
body: '{{state}}',
method: 'POST',
typebotId,
headers: [],
queryParams: [],
},
})
return res.send({ message: 'success' })

View File

@ -32,6 +32,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
data: {
typebotId,
isCompleted: false,
variables: [],
},
})
res.send({ result })