mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-26 15:17:44 -06:00
fix: For compatibility reasons, container mode has been removed
This commit is contained in:
@@ -15,7 +15,6 @@ import {
|
||||
import { RepositoryBroker } from '../repository/repository.manager';
|
||||
import { NotFoundException } from '../../exceptions';
|
||||
import { Db } from 'mongodb';
|
||||
import { initInstance } from '../whatsapp.module';
|
||||
import { RedisCache } from '../../db/redis.client';
|
||||
import { execSync } from 'child_process';
|
||||
import { dbserver } from '../../db/db.connect';
|
||||
@@ -287,7 +286,6 @@ export class WAMonitoringService {
|
||||
keys.forEach(async (k) => await set(k.split(':')[1]));
|
||||
} else {
|
||||
this.logger.verbose('no instance keys found');
|
||||
initInstance();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -303,7 +301,6 @@ export class WAMonitoringService {
|
||||
);
|
||||
} else {
|
||||
this.logger.verbose('no collections found');
|
||||
initInstance();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -324,7 +321,6 @@ export class WAMonitoringService {
|
||||
await set(dirent.name);
|
||||
} else {
|
||||
this.logger.verbose('no instance files found');
|
||||
initInstance();
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -346,7 +346,6 @@ export class WAStartupService {
|
||||
const serverUrl = this.configService.get<HttpServer>('SERVER').URL;
|
||||
const we = event.replace(/[\.-]/gm, '_').toUpperCase();
|
||||
const transformedWe = we.replace(/_/gm, '-').toLowerCase();
|
||||
const instance = this.configService.get<Auth>('AUTHENTICATION').INSTANCE;
|
||||
|
||||
const expose =
|
||||
this.configService.get<Auth>('AUTHENTICATION').EXPOSE_IN_FETCH_INSTANCES;
|
||||
@@ -355,7 +354,7 @@ export class WAStartupService {
|
||||
|
||||
const globalApiKey = this.configService.get<Auth>('AUTHENTICATION').API_KEY.KEY;
|
||||
|
||||
if (local && instance.MODE !== 'container') {
|
||||
if (local) {
|
||||
if (Array.isArray(webhookLocal) && webhookLocal.includes(we)) {
|
||||
this.logger.verbose('Sending data to webhook local');
|
||||
let baseURL;
|
||||
@@ -432,13 +431,7 @@ export class WAStartupService {
|
||||
globalURL = globalWebhook.URL;
|
||||
}
|
||||
|
||||
let localUrl;
|
||||
|
||||
if (instance.MODE === 'container') {
|
||||
localUrl = instance.WEBHOOK_URL;
|
||||
} else {
|
||||
localUrl = this.localWebhook.url;
|
||||
}
|
||||
const localUrl = this.localWebhook.url;
|
||||
|
||||
if (this.configService.get<Log>('LOG').LEVEL.includes('WEBHOOKS')) {
|
||||
const logData = {
|
||||
|
||||
Reference in New Issue
Block a user