From b7936d77f55627bc8fe66dd62f314f98b5578596 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Sun, 9 Jun 2024 17:11:45 -0300 Subject: [PATCH] docker --- Docker/scripts/deploy_database.sh | 3 +-- src/api/integrations/typebot/services/typebot.service.ts | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Docker/scripts/deploy_database.sh b/Docker/scripts/deploy_database.sh index 58922442c..772e74870 100755 --- a/Docker/scripts/deploy_database.sh +++ b/Docker/scripts/deploy_database.sh @@ -8,8 +8,7 @@ fi if [[ "$DATABASE_PROVIDER" == "postgresql" || "$DATABASE_PROVIDER" == "mysql" ]]; then export DATABASE_URL - ./node_modules/.bin/prisma migrate deploy --schema=prisma/$DATABASE_PROVIDER-schema.prisma - ./node_modules/.bin/prisma generate --schema=prisma/$DATABASE_PROVIDER-schema.prisma + ./node_modules/.bin/prisma migrate dev --name init --schema ./prisma/$DATABASE_PROVIDER-schema.prisma else echo "Error: Database provider $DATABASE_PROVIDER invalid." exit 1 diff --git a/src/api/integrations/typebot/services/typebot.service.ts b/src/api/integrations/typebot/services/typebot.service.ts index 7d48156cf..d6636dddf 100644 --- a/src/api/integrations/typebot/services/typebot.service.ts +++ b/src/api/integrations/typebot/services/typebot.service.ts @@ -712,10 +712,10 @@ export class TypebotService { listResponseMessage: msg.listResponseMessage?.singleSelectReply?.selectedRowId, responseRowId: msg.listResponseMessage?.singleSelectReply?.selectedRowId, // Medias - audioMessage: `audioMessage:${msg.key.id}`, - imageMessage: `imageMessage:${msg.key.id}`, - videoMessage: `videoMessage:${msg.key.id}`, - documentMessage: `documentMessage:${msg.key.id}`, + audioMessage: `audioMessage:${msg?.key?.id}`, + imageMessage: `imageMessage:${msg?.key?.id}`, + videoMessage: `videoMessage:${msg?.key?.id}`, + documentMessage: `documentMessage:${msg?.key?.id}`, }; const messageType = Object.keys(types).find((key) => types[key] !== undefined) || 'unknown';