refactor: update Flowise integration for improved configuration and validation

This commit refines the Flowise integration by enhancing configuration management and validation logic. Key changes include:
- Reordered parameters in the FlowiseService constructor for consistency.
- Updated FlowiseController to utilize the configService for integration enablement checks.
- Simplified FlowiseDto and FlowiseSettingDto by removing unused properties.
- Enhanced validation logic in flowise.schema.ts to include new fields.
- Improved error handling in the createBot method to prevent duplicate entries.

These updates contribute to a more robust and maintainable Flowise integration.
This commit is contained in:
Guilherme Gomes
2025-05-27 15:49:15 -03:00
parent 64fc7a05ac
commit 95bd85b6e3
6 changed files with 143 additions and 133 deletions

View File

@@ -129,7 +129,7 @@ export const difyController = new DifyController(difyService, prismaRepository,
const evolutionBotService = new EvolutionBotService(waMonitor, configService, prismaRepository, openaiService);
export const evolutionBotController = new EvolutionBotController(evolutionBotService, prismaRepository, waMonitor);
const flowiseService = new FlowiseService(waMonitor, configService, prismaRepository, openaiService);
const flowiseService = new FlowiseService(waMonitor, prismaRepository, configService, openaiService);
export const flowiseController = new FlowiseController(flowiseService, prismaRepository, waMonitor);
const n8nService = new N8nService(waMonitor, prismaRepository, configService, openaiService);