Skip to content

Commit

Permalink
fix: provider variables are no longer mandatory in the env
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidsonGomes committed Jun 11, 2024
1 parent f551242 commit 87c68df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/api/server.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CacheEngine } from '../cache/cacheengine';
import { Chatwoot, configService } from '../config/env.config';
import { Chatwoot, configService, ProviderSession } from '../config/env.config';
import { eventEmitter } from '../config/event.config';
import { Logger } from '../config/logger.config';
import { ChatController } from './controllers/chat.controller';
Expand Down Expand Up @@ -39,7 +39,11 @@ if (configService.get<Chatwoot>('CHATWOOT').ENABLED) {
export const cache = new CacheService(new CacheEngine(configService, 'instance').getEngine());
const baileysCache = new CacheService(new CacheEngine(configService, 'baileys').getEngine());

const providerFiles = new ProviderFiles(configService);
let providerFiles: ProviderFiles = null;
if (configService.get<ProviderSession>('PROVIDER').ENABLED) {
providerFiles = new ProviderFiles(configService);
}

export const prismaRepository = new PrismaRepository(configService);

export const waMonitor = new WAMonitoringService(
Expand Down

0 comments on commit 87c68df

Please sign in to comment.