n8n-3867-progressively-apply-prettier-to-all (#3873)

* 🔨 formatting nodes with prettier
This commit is contained in:
Michael Kret
2022-08-17 18:50:24 +03:00
committed by GitHub
parent f2d326c7f0
commit 91d7e16c81
1072 changed files with 42357 additions and 59109 deletions

View File

@@ -1,11 +1,6 @@
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
import {
IExecuteFunctions,
ILoadOptionsFunctions,
} from 'n8n-core';
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
import {
ICredentialDataDecryptedObject,
@@ -32,7 +27,11 @@ export async function googleApiRequest(
body: IDataObject = {},
qs: IDataObject = {},
) {
const authenticationMethod = this.getNodeParameter('authentication', 0, 'serviceAccount') as string;
const authenticationMethod = this.getNodeParameter(
'authentication',
0,
'serviceAccount',
) as string;
const options: OptionsWithUri & { headers: IDataObject } = {
headers: {
'Content-Type': 'application/json',
@@ -56,10 +55,12 @@ export async function googleApiRequest(
if (authenticationMethod === 'serviceAccount') {
const credentials = await this.getCredentials('googleApi');
const { access_token } = await getAccessToken.call(this, credentials as unknown as IGoogleAuthCredentials);
const { access_token } = await getAccessToken.call(
this,
credentials as unknown as IGoogleAuthCredentials,
);
options.headers.Authorization = `Bearer ${access_token}`;
return await this.helpers.request!(options);
} else {
return await this.helpers.requestOAuth2!.call(this, 'googleSlidesOAuth2Api', options);
}