mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Google service account remove duplicated functions (no-changelog) (#6368)
This commit is contained in:
@@ -22,10 +22,10 @@ import type {
|
||||
} from './GoogleSheet';
|
||||
import { GoogleSheet } from './GoogleSheet';
|
||||
|
||||
import type { IGoogleAuthCredentials } from './GenericFunctions';
|
||||
import { getAccessToken, googleApiRequest, hexToRgb } from './GenericFunctions';
|
||||
import { googleApiRequest, hexToRgb } from './GenericFunctions';
|
||||
|
||||
import { versionDescription } from './versionDescription';
|
||||
import { getGoogleAccessToken } from '../../GenericFunctions';
|
||||
|
||||
export class GoogleSheetsV1 implements INodeType {
|
||||
description: INodeTypeDescription;
|
||||
@@ -71,10 +71,8 @@ export class GoogleSheetsV1 implements INodeType {
|
||||
credential: ICredentialsDecrypted,
|
||||
): Promise<INodeCredentialTestResult> {
|
||||
try {
|
||||
const tokenRequest = await getAccessToken.call(
|
||||
this,
|
||||
credential.data! as unknown as IGoogleAuthCredentials,
|
||||
);
|
||||
const tokenRequest = await getGoogleAccessToken.call(this, credential.data!, 'sheetV1');
|
||||
|
||||
if (!tokenRequest.access_token) {
|
||||
return {
|
||||
status: 'Error',
|
||||
|
||||
Reference in New Issue
Block a user