🐛 Fix bug with Google Drive node (#1443)

* 🐛 Fix bug with Google Drive node

The bug did not let the user to select the fields he wanted the API to return in the resources Folder and File.

*  Change default to not break anything and hide not needed options

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Ricardo Espinoza
2021-02-15 03:02:47 -05:00
committed by GitHub
parent 4b8b08450f
commit 19412b6025
2 changed files with 38 additions and 56 deletions

View File

@@ -45,8 +45,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
const { access_token } = await getAccessToken.call(this, credentials as IDataObject);
options.headers!.Authorization = `Bearer ${access_token}`;
//@ts-ignore
return await this.helpers.request(options);
return await this.helpers.request!(options);
} else {
//@ts-ignore
return await this.helpers.requestOAuth2.call(this, 'googleDriveOAuth2Api', options);
@@ -140,6 +139,5 @@ function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoa
json: true,
};
//@ts-ignore
return this.helpers.request(options);
return this.helpers.request!(options);
}