fix: adjusts in returns in endpoints chatwoot and webhook

This commit is contained in:
Davidson Gomes
2023-07-17 11:33:08 -03:00
parent 69353892d9
commit 8a14141021
3 changed files with 35 additions and 17 deletions

View File

@@ -66,6 +66,18 @@ export class ChatwootController {
const urlServer = this.configService.get<HttpServer>('SERVER').URL;
if (Object.keys(result).length === 0) {
return {
enabled: false,
url: '',
account_id: '',
token: '',
sign_msg: false,
name_inbox: '',
webhook_url: '',
};
}
const response = {
...result,
webhook_url: `${urlServer}/chatwoot/webhook/${instance.instanceName}`,