From 9367be0fb1dd39a31a52efeb221622859bd79480 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Fri, 9 Aug 2024 06:53:43 -0300 Subject: [PATCH] chore: adjusting details --- src/api/integrations/dify/services/dify.service.ts | 4 ---- src/api/integrations/rabbitmq/routes/rabbitmq.router.ts | 1 - src/api/integrations/s3/libs/minio.server.ts | 5 +++-- src/api/routes/view.router.ts | 3 --- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/api/integrations/dify/services/dify.service.ts b/src/api/integrations/dify/services/dify.service.ts index af94fc70..fb658cfa 100644 --- a/src/api/integrations/dify/services/dify.service.ts +++ b/src/api/integrations/dify/services/dify.service.ts @@ -1209,7 +1209,6 @@ export class DifyService { responseType: 'stream', }); - let completeMessage = ''; let conversationId; const stream = response.data; @@ -1221,10 +1220,7 @@ export class DifyService { try { const event = JSON.parse(data); if (event.event === 'agent_message') { - completeMessage += event.answer; conversationId = conversationId ?? event?.conversation_id; - - console.log('completeMessage:', completeMessage); } } catch (error) { console.error('Error parsing stream data:', error); diff --git a/src/api/integrations/rabbitmq/routes/rabbitmq.router.ts b/src/api/integrations/rabbitmq/routes/rabbitmq.router.ts index 52e5f7ba..d1a0a891 100644 --- a/src/api/integrations/rabbitmq/routes/rabbitmq.router.ts +++ b/src/api/integrations/rabbitmq/routes/rabbitmq.router.ts @@ -12,7 +12,6 @@ export class RabbitmqRouter extends RouterBroker { super(); this.router .post(this.routerPath('set'), ...guards, async (req, res) => { - console.log('RabbitmqRouter -> constructor -> req', req.body); const response = await this.dataValidate({ request: req, schema: rabbitmqSchema, diff --git a/src/api/integrations/s3/libs/minio.server.ts b/src/api/integrations/s3/libs/minio.server.ts index a2afb305..7be7c791 100644 --- a/src/api/integrations/s3/libs/minio.server.ts +++ b/src/api/integrations/s3/libs/minio.server.ts @@ -50,7 +50,8 @@ const createBucket = async () => { logger.info(`S3 Bucket ${bucketName} - ON`); return true; } catch (error) { - console.log('S3 ERROR: ', error); + logger.error('S3 ERROR:'); + logger.error(error); return false; } } @@ -65,7 +66,7 @@ const uploadFile = async (fileName: string, file: Buffer | Transform | Readable, metadata['custom-header-application'] = 'evolution-api'; return await minioClient.putObject(bucketName, objectName, file, size, metadata); } catch (error) { - console.log('ERROR: ', error); + logger.error(error); return error; } } diff --git a/src/api/routes/view.router.ts b/src/api/routes/view.router.ts index 8e8fc849..255c2bdb 100644 --- a/src/api/routes/view.router.ts +++ b/src/api/routes/view.router.ts @@ -13,9 +13,6 @@ export class ViewsRouter extends RouterBroker { const basePath = path.join(process.cwd(), 'manager', 'dist'); const indexPath = path.join(basePath, 'index.html'); - console.log('Base path:', basePath); - console.log('Index path:', indexPath); - this.router.use(express.static(basePath)); this.router.get('*', (req, res) => {