mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 21:07:28 -08:00
⚡ Some minor improvements
This commit is contained in:
parent
fbfdd7ceb5
commit
094614508d
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
} from 'request';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
|
@ -64,7 +64,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
|
|||
|
||||
errorMessages = errorMessages.join('|');
|
||||
|
||||
} else if (error.response.body.error.message){
|
||||
} else if (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[] = [];
|
||||
|
||||
|
@ -93,7 +93,7 @@ export async function googleApiRequestAllItems(this: IExecuteFunctions | ILoadOp
|
|||
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
|
||||
|
||||
const scopes = [
|
||||
|
|
|
@ -797,7 +797,7 @@ export class GoogleDrive implements INodeType {
|
|||
{
|
||||
name: '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',
|
||||
|
@ -945,7 +945,7 @@ export class GoogleDrive implements INodeType {
|
|||
queryCorpora = options.corpora as string;
|
||||
}
|
||||
|
||||
let driveId : string | undefined;
|
||||
let driveId: string | undefined;
|
||||
driveId = options.driveId as string;
|
||||
if (driveId === '') {
|
||||
driveId = undefined;
|
||||
|
|
|
@ -138,7 +138,7 @@ export class Twitter implements INodeType {
|
|||
const isImage = binaryData[binaryPropertyName].mimeType.includes('image');
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue