mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user