Fix update methods

This commit is contained in:
trojanh 2020-02-03 15:07:56 +05:30
parent 0121e3b85c
commit 41b1245610

View file

@ -449,8 +449,9 @@ export class Harvest implements INodeType {
// createByDuration
// ----------------------------------
requestMethod = 'POST';
endpoint = resource;
requestMethod = 'PATCH';
const id = this.getNodeParameter('id', i) as string;
endpoint = `${resource}/${id}`;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
Object.assign(qs, updateFields);
@ -602,8 +603,9 @@ export class Harvest implements INodeType {
// createByDuration
// ----------------------------------
requestMethod = 'POST';
endpoint = resource;
requestMethod = 'PATCH';
const id = this.getNodeParameter('id', i) as string;
endpoint = `${resource}/${id}`;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
Object.assign(qs, updateFields);