From 6f2bef678c8ba46f6fc4b9fa84e5ae0a13b08715 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Fri, 12 Dec 2025 17:57:44 -0300 Subject: [PATCH] fix(chat): clean up code formatting by removing unnecessary blank lines in chat controller --- src/api/controllers/chat.controller.ts | 3 ++- .../integrations/channel/whatsapp/whatsapp.baileys.service.ts | 3 ++- src/api/routes/chat.router.ts | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/api/controllers/chat.controller.ts b/src/api/controllers/chat.controller.ts index 27feca83..fa5ea5fb 100644 --- a/src/api/controllers/chat.controller.ts +++ b/src/api/controllers/chat.controller.ts @@ -121,7 +121,8 @@ export class ChatController { remoteJid: data.remoteJid, }; return await this.waMonitor.waInstances[instanceName].baileysDecryptPollVote(pollCreationMessageKey); - + } + public async fetchChannels({ instanceName }: InstanceDto, query: Query) { return await this.waMonitor.waInstances[instanceName].fetchChannels(query); } diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index aad88a37..b75e31a8 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -5382,7 +5382,8 @@ export class BaileysStartupService extends ChannelStartupService { this.logger.error(`Error decrypting poll votes: ${error}`); throw new InternalServerErrorException('Error decrypting poll votes', error.toString()); } - + } + public async fetchChannels(query: Query) { const page = Number((query as any)?.page ?? 1); const limit = Number((query as any)?.limit ?? (query as any)?.rows ?? 50); diff --git a/src/api/routes/chat.router.ts b/src/api/routes/chat.router.ts index d90f9b36..28578d9e 100644 --- a/src/api/routes/chat.router.ts +++ b/src/api/routes/chat.router.ts @@ -290,6 +290,10 @@ export class ChatRouter extends RouterBroker { schema: decryptPollVoteSchema, ClassRef: DecryptPollVoteDto, execute: (instance, data) => chatController.decryptPollVote(instance, data), + }); + + return res.status(HttpStatus.OK).json(response); + }) .post(this.routerPath('findChannels'), ...guards, async (req, res) => { const response = await this.dataValidate({ request: req,