refactor: integration folders and fix manager bugs

This commit is contained in:
Davidson Gomes
2024-08-23 13:46:51 -03:00
parent beafc62403
commit 6a62ae85fc
17 changed files with 122 additions and 122 deletions

View File

@@ -19,7 +19,7 @@ export class ChatwootController {
public async createChatwoot(instance: InstanceDto, data: ChatwootDto) {
if (!this.configService.get<Chatwoot>('CHATWOOT').ENABLED) throw new BadRequestException('Chatwoot is disabled');
if (data.enabled) {
if (data?.enabled) {
if (!isURL(data.url, { require_tld: false })) {
throw new BadRequestException('url is not valid');
}