fix(resource locator): add back extract value logic (#4178)

add back extract value logic
This commit is contained in:
Mutasem Aldmour
2022-09-23 11:56:57 +02:00
committed by GitHub
parent 87e6877f1d
commit 46f95622e3
7 changed files with 342 additions and 40 deletions

View File

@@ -2153,7 +2153,9 @@ export class GoogleDrive implements INodeType {
// delete
// ----------------------------------
const driveId = this.getNodeParameter('driveId', i) as string;
const driveId = this.getNodeParameter('driveId', i, undefined, {
extractValue: true,
}) as string;
await googleApiRequest.call(this, 'DELETE', `/drive/v3/drives/${driveId}`);
@@ -2169,7 +2171,9 @@ export class GoogleDrive implements INodeType {
// get
// ----------------------------------
const driveId = this.getNodeParameter('driveId', i) as string;
const driveId = this.getNodeParameter('driveId', i, undefined, {
extractValue: true,
}) as string;
const qs: IDataObject = {};
@@ -2229,7 +2233,9 @@ export class GoogleDrive implements INodeType {
// update
// ----------------------------------
const driveId = this.getNodeParameter('driveId', i) as string;
const driveId = this.getNodeParameter('driveId', i, undefined, {
extractValue: true,
}) as string;
const body: IDataObject = {};
@@ -2256,7 +2262,9 @@ export class GoogleDrive implements INodeType {
// copy
// ----------------------------------
const fileId = this.getNodeParameter('fileId', i) as string;
const fileId = this.getNodeParameter('fileId', i, undefined, {
extractValue: true,
}) as string;
const body: IDataObject = {
fields: queryFields,
@@ -2292,7 +2300,9 @@ export class GoogleDrive implements INodeType {
// download
// ----------------------------------
const fileId = this.getNodeParameter('fileId', i) as string;
const fileId = this.getNodeParameter('fileId', i, undefined, {
extractValue: true,
}) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
const requestOptions = {
@@ -2635,7 +2645,9 @@ export class GoogleDrive implements INodeType {
// file:update
// ----------------------------------
const id = this.getNodeParameter('fileId', i) as string;
const id = this.getNodeParameter('fileId', i, undefined, {
extractValue: true,
}) as string;
const updateFields = this.getNodeParameter('updateFields', i, {}) as IDataObject;
const qs: IDataObject = {
@@ -2709,7 +2721,9 @@ export class GoogleDrive implements INodeType {
// delete
// ----------------------------------
const fileId = this.getNodeParameter('fileId', i) as string;
const fileId = this.getNodeParameter('fileId', i, undefined, {
extractValue: true,
}) as string;
await googleApiRequest.call(
this,
@@ -2731,7 +2745,9 @@ export class GoogleDrive implements INodeType {
returnData.push(...executionData);
}
if (operation === 'share') {
const fileId = this.getNodeParameter('fileId', i) as string;
const fileId = this.getNodeParameter('fileId', i, undefined, {
extractValue: true,
}) as string;
const permissions = this.getNodeParameter('permissionsUi', i) as IDataObject;