Simplify events structure and fix minor issues

This commit is contained in:
Stênio Aníbal
2024-08-23 10:53:31 -03:00
parent beb7942d7c
commit 05ee65f422
28 changed files with 475 additions and 698 deletions

View File

@@ -1,7 +1,7 @@
import { ProviderFiles } from '@api/provider/sessions';
import { PrismaRepository } from '@api/repository/repository.service';
import { HttpStatus, router } from '@api/routes/index.router';
import { eventController, waMonitor } from '@api/server.module';
import { eventManager, waMonitor } from '@api/server.module';
import { Auth, configService, Cors, HttpServer, ProviderSession, Webhook } from '@config/env.config';
import { onUnexpectedError } from '@config/error.config';
import { Logger } from '@config/logger.config';
@@ -139,7 +139,7 @@ async function bootstrap() {
ServerUP.app = app;
const server = ServerUP[httpServer.TYPE];
eventController.init(server);
eventManager.init(server);
server.listen(httpServer.PORT, () => logger.log(httpServer.TYPE.toUpperCase() + ' - ON: ' + httpServer.PORT));