2
0

fix(results): 🐛 Collect prefilled variables in db

This commit is contained in:
Baptiste Arnaud
2022-02-17 16:08:01 +01:00
parent 0336bc2a42
commit aaf78e8a54
19 changed files with 454 additions and 507 deletions

View File

@ -1,11 +1,15 @@
import { Result } from 'db'
import { VariableWithValue } from 'models'
import { sendRequest } from 'utils'
export const createResult = async (typebotId: string) => {
export const createResult = async (
typebotId: string,
prefilledVariables: VariableWithValue[]
) => {
return sendRequest<Result>({
url: `/api/results`,
method: 'POST',
body: { typebotId },
body: { typebotId, prefilledVariables },
})
}