Refactor: version, node description and if-else statements

This commit is contained in:
Valentina Lilova 2022-05-31 15:00:22 +03:00
commit 1420b0248c
3 changed files with 80 additions and 35 deletions

View file

@ -9,9 +9,7 @@ export const contactOperations: INodeProperties[] = [
type: 'options',
displayOptions: {
show: {
resource: [
'contact',
],
resource: ['contact'],
},
},
options: [
@ -33,20 +31,16 @@ export const contactFields: INodeProperties[] = [
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
type: 'string',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'contact',
],
resource: ['contact'],
operation: ['create'],
},
},
default:'',
description:'Primary email for the contact',
default: '',
description: 'Primary email for the contact',
},
{
displayName: 'Additional Fields',
@ -56,12 +50,8 @@ export const contactFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'contact',
],
operation: [
'create',
],
resource: ['contact'],
operation: ['create'],
},
},
options: [