🐛 Fix users:Company operation in Intercom node (#1666)

This commit is contained in:
MedAliMarz 2021-04-24 17:29:09 +02:00 committed by GitHub
parent cc5b1d9cd2
commit 6fcbb2ad45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -512,13 +512,13 @@ export class Intercom implements INodeType {
} }
} }
if (operation === 'users') { if (operation === 'users') {
const filterBy = this.getNodeParameter('filterBy', 0) as string; const listBy = this.getNodeParameter('listBy', 0) as string;
const value = this.getNodeParameter('value', i) as string; const value = this.getNodeParameter('value', i) as string;
if (filterBy === 'companyId') { if (listBy === 'companyId') {
qs.company_id = value; qs.company_id = value;
} }
try { try {
if (filterBy === 'id') { if (listBy === 'id') {
responseData = await intercomApiRequest.call(this, `/companies/${value}/users`, 'GET', {}, qs); responseData = await intercomApiRequest.call(this, `/companies/${value}/users`, 'GET', {}, qs);
} else { } else {
qs.type = 'users'; qs.type = 'users';