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

@ -41,7 +41,8 @@ export const injectFakeResults = async ({
: new Date(),
isCompleted: rand > 0.5,
hasStarted: true,
}
variables: [],
} satisfies Prisma.ResultCreateManyInput
}),
],
})
@ -135,7 +136,10 @@ export const createWorkspaces = async (workspaces: Partial<Workspace>[]) => {
export const updateUser = (data: Partial<User>) =>
prisma.user.update({
data,
data: {
...data,
onboardingCategories: data.onboardingCategories ?? [],
},
where: {
id: userId,
},
@ -149,7 +153,14 @@ export const createWebhook = async (
await prisma.webhook.delete({ where: { id: 'webhook1' } })
} catch {}
return prisma.webhook.create({
data: { method: 'GET', typebotId, id: 'webhook1', ...webhookProps },
data: {
method: 'GET',
typebotId,
id: 'webhook1',
...webhookProps,
queryParams: webhookProps?.queryParams ?? [],
headers: webhookProps?.headers ?? [],
},
})
}