Rename operations

This commit is contained in:
Jan Oberhauser 2019-12-07 22:21:04 +01:00
parent 975856a772
commit ee4c46dbd3
2 changed files with 13 additions and 13 deletions

View file

@ -39,13 +39,13 @@ export const dealOperations = [
description: 'Delete a deals',
},
{
name: 'Recents Created',
value: 'getRecentsCreated',
name: 'Get Recently Created',
value: 'getRecentlyCreated',
description: 'Get recently created deals',
},
{
name: 'Recents Modified',
value: 'getRecentsModified',
name: 'Get Recently Modified',
value: 'getRecentlyModified',
description: 'Get recently modified deals',
},
],
@ -406,7 +406,7 @@ export const dealFields = [
description: 'Unique identifier for a particular deal',
},
/* -------------------------------------------------------------------------- */
/* deal:getRecentsCreated deal:getRecentsModified */
/* deal:getRecentlyCreated deal:getRecentlyModified */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
@ -418,8 +418,8 @@ export const dealFields = [
'deal',
],
operation: [
'getRecentsCreated',
'getRecentsModified',
'getRecentlyCreated',
'getRecentlyModified',
],
},
},
@ -436,8 +436,8 @@ export const dealFields = [
'deal',
],
operation: [
'getRecentsCreated',
'getRecentsModified',
'getRecentlyCreated',
'getRecentlyModified',
],
returnAll: [
false,
@ -463,8 +463,8 @@ export const dealFields = [
'deal',
],
operation: [
'getRecentsCreated',
'getRecentsModified',
'getRecentlyCreated',
'getRecentlyModified',
],
},
},

View file

@ -320,7 +320,7 @@ export class Hubspot implements INodeType {
throw new Error(`Hubspot Error: ${JSON.stringify(err)}`);
}
}
if (operation === 'getRecentsCreated' || operation === 'getRecentsModified') {
if (operation === 'getRecentlyCreated' || operation === 'getRecentlyModified') {
let endpoint;
const filters = this.getNodeParameter('filters', i) as IDataObject;
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
@ -331,7 +331,7 @@ export class Hubspot implements INodeType {
qs.includePropertyVersions = filters.includePropertyVersions as boolean;
}
try {
if (operation === 'getRecentsCreated') {
if (operation === 'getRecentlyCreated') {
endpoint = `/deals/v1/deal/recent/created`;
} else {
endpoint = `/deals/v1/deal/recent/modified`;