🚸 (whatsapp) Improve upgrade plan for whatsapp notice

This commit is contained in:
Baptiste Arnaud
2023-09-27 14:22:51 +02:00
parent ec52fdc0ad
commit ccc34b3028
8 changed files with 36 additions and 35 deletions

View File

@@ -191,13 +191,18 @@ const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) => {
await prisma.typebot.updateMany({
where: { id: typebot.id },
data: {
whatsAppCredentialsId: null,
settings: {
...settings,
general: {
...settings.general,
isBrandingEnabled: true,
},
whatsApp: settings.whatsApp
? {
...settings.whatsApp,
isEnabled: false,
}
: undefined,
},
},
})