2
0

fix: 🐛 misc

- Collaboration / Invitation type change failed
- ChoiceForm items text align left
- Webhook fails when choosing GET only
This commit is contained in:
Baptiste Arnaud
2022-03-30 10:54:31 +02:00
parent 2461dd89be
commit c7d5373127
5 changed files with 28 additions and 16 deletions

View File

@ -1,6 +1,7 @@
import prisma from 'libs/prisma'
import {
defaultWebhookAttributes,
HttpMethod,
KeyValue,
PublicTypebot,
ResultValues,
@ -105,11 +106,14 @@ const executeWebhook =
convertKeyValueTableToObject(webhook.queryParams, variables)
)
const contentType = headers ? headers['Content-Type'] : undefined
const body = getBodyContent(typebot)({
body: webhook.body,
resultValues,
blockId,
})
const body =
webhook.method !== HttpMethod.GET
? getBodyContent(typebot)({
body: webhook.body,
resultValues,
blockId,
})
: undefined
try {
const response = await got(
parseVariables(variables)(