mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
chore: Add apiKey and ServerUrl to prefilledVariables in typebot service
Update typebot.service.ts to add apiKey and ServerUrl to prefilledVariables. This change is necessary for the typebot service to correctly prefill variables with the required credentials. The deleted file .github/workflows/publish_docker_image_v2.yml was not related to this change. Note: This change does not affect the current functionality but provides a better way to handle credentials. Confidence: 90%
This commit is contained in:
parent
b907d85a7e
commit
9aa2b1b3bf
48
.github/workflows/publish_docker_image_v2.yml
vendored
48
.github/workflows/publish_docker_image_v2.yml
vendored
@ -1,48 +0,0 @@
|
||||
name: Build Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v2.0.0
|
||||
|
||||
jobs:
|
||||
build_deploy:
|
||||
name: Build and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: atendai/evolution-api
|
||||
tags: v2.0.0-beta
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
@ -1,9 +1,10 @@
|
||||
import { Message, Typebot as TypebotModel, TypebotSession } from '@prisma/client';
|
||||
import axios from 'axios';
|
||||
|
||||
import { ConfigService, S3, Typebot } from '../../../../config/env.config';
|
||||
import { Auth, ConfigService, HttpServer, S3, Typebot } from '../../../../config/env.config';
|
||||
import { Logger } from '../../../../config/logger.config';
|
||||
import { sendTelemetry } from '../../../../utils/sendTelemetry';
|
||||
import { ServerUP } from '../../../../utils/server-up';
|
||||
import { InstanceDto } from '../../../dto/instance.dto';
|
||||
import { PrismaRepository } from '../../../repository/repository.service';
|
||||
import { WAMonitoringService } from '../../../services/monitor.service';
|
||||
@ -710,6 +711,8 @@ export class TypebotService {
|
||||
const prefilledVariables = {
|
||||
remoteJid: remoteJid,
|
||||
instanceName: instance.instanceName,
|
||||
serverUrl: this.configService.get<HttpServer>('SERVER').URL,
|
||||
apiKey: this.configService.get<Auth>('AUTHENTICATION').API_KEY.KEY,
|
||||
};
|
||||
|
||||
if (variables?.length) {
|
||||
@ -904,6 +907,8 @@ export class TypebotService {
|
||||
remoteJid: data.remoteJid,
|
||||
pushName: data.pushName || data.prefilledVariables?.pushName || '',
|
||||
instanceName: instance.instanceName,
|
||||
serverUrl: this.configService.get<HttpServer>('SERVER').URL,
|
||||
apiKey: this.configService.get<Auth>('AUTHENTICATION').API_KEY.KEY,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
@ -917,6 +922,8 @@ export class TypebotService {
|
||||
remoteJid: data.remoteJid,
|
||||
pushName: data.pushName || data.prefilledVariables?.pushName || '',
|
||||
instanceName: instance.instanceName,
|
||||
serverUrl: this.configService.get<HttpServer>('SERVER').URL,
|
||||
apiKey: this.configService.get<Auth>('AUTHENTICATION').API_KEY.KEY,
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -936,6 +943,8 @@ export class TypebotService {
|
||||
remoteJid: data.remoteJid,
|
||||
pushName: data.pushName || '',
|
||||
instanceName: instance.instanceName,
|
||||
serverUrl: this.configService.get<HttpServer>('SERVER').URL,
|
||||
apiKey: this.configService.get<Auth>('AUTHENTICATION').API_KEY.KEY,
|
||||
},
|
||||
awaitUser: false,
|
||||
typebotId: data.typebotId,
|
||||
|
Loading…
Reference in New Issue
Block a user