Some minor improvements

This commit is contained in:
Jan Oberhauser 2020-06-13 13:47:49 +02:00
parent fbfdd7ceb5
commit 094614508d
3 changed files with 21 additions and 21 deletions

View file

@ -1,6 +1,6 @@
import { import {
OptionsWithUri, OptionsWithUri,
} from 'request'; } from 'request';
import { import {
IExecuteFunctions, IExecuteFunctions,
@ -64,7 +64,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
errorMessages = errorMessages.join('|'); errorMessages = errorMessages.join('|');
} else if (error.response.body.error.message){ } else if (error.response.body.error.message) {
errorMessages = error.response.body.error.message; errorMessages = error.response.body.error.message;
} }
@ -74,7 +74,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
} }
} }
export async function googleApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string ,method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any export async function googleApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
const returnData: IDataObject[] = []; const returnData: IDataObject[] = [];
@ -93,7 +93,7 @@ export async function googleApiRequestAllItems(this: IExecuteFunctions | ILoadOp
return returnData; return returnData;
} }
function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, credentials: IDataObject) : Promise<IDataObject> { function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, credentials: IDataObject): Promise<IDataObject> {
//https://developers.google.com/identity/protocols/oauth2/service-account#httprest //https://developers.google.com/identity/protocols/oauth2/service-account#httprest
const scopes = [ const scopes = [

View file

@ -797,7 +797,7 @@ export class GoogleDrive implements INodeType {
{ {
name: 'domain', name: 'domain',
value: 'domain', value: 'domain',
description:"All files shared to the user's domain that are searchable", description: 'All files shared to the user\'s domain that are searchable',
}, },
{ {
name: 'drive', name: 'drive',
@ -945,7 +945,7 @@ export class GoogleDrive implements INodeType {
queryCorpora = options.corpora as string; queryCorpora = options.corpora as string;
} }
let driveId : string | undefined; let driveId: string | undefined;
driveId = options.driveId as string; driveId = options.driveId as string;
if (driveId === '') { if (driveId === '') {
driveId = undefined; driveId = undefined;

View file

@ -138,7 +138,7 @@ export class Twitter implements INodeType {
const isImage = binaryData[binaryPropertyName].mimeType.includes('image'); const isImage = binaryData[binaryPropertyName].mimeType.includes('image');
if (isImage && isAnimatedWebp) { if (isImage && isAnimatedWebp) {
throw new Error('Animated .webp images are not supported use .git instead'); throw new Error('Animated .webp images are not supported use .gif instead');
} }
if (isImage) { if (isImage) {