refactor(core): Fix misspelling of credentials (#3479)

This commit is contained in:
Erick Friis 2022-06-13 12:41:18 -07:00 committed by GitHub
parent 34e891c0f8
commit 0f630b97cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 18 additions and 18 deletions

View file

@ -19,7 +19,7 @@ import {
awsApiRequestREST,
IExpenseDocument,
simplify,
validateCrendetials,
validateCredentials,
} from './GenericFunctions';
export class AwsTextract implements INodeType {
@ -93,7 +93,7 @@ export class AwsTextract implements INodeType {
credentialTest: {
async awsTextractApiCredentialTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult> {
try {
await validateCrendetials.call(this, credential.data as ICredentialDataDecryptedObject, 'sts');
await validateCredentials.call(this, credential.data as ICredentialDataDecryptedObject, 'sts');
} catch (error) {
return {
status: 'Error',

View file

@ -128,7 +128,7 @@ export interface IExpenseDocument {
}];
}
export async function validateCrendetials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, service: string): Promise<any> { // tslint:disable-line:no-any
export async function validateCredentials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, service: string): Promise<any> { // tslint:disable-line:no-any
const credentials = decryptedCredentials;
// Concatenate path and instantiate URL object so it parses correctly query strings

View file

@ -15,7 +15,7 @@ import {
import {
dhlApiRequest,
validateCrendetials,
validateCredentials,
} from './GenericFunctions';
export class Dhl implements INodeType {
@ -103,7 +103,7 @@ export class Dhl implements INodeType {
credentialTest: {
async dhlApiCredentialTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult> {
try {
await validateCrendetials.call(this, credential.data as ICredentialDataDecryptedObject);
await validateCredentials.call(this, credential.data as ICredentialDataDecryptedObject);
} catch (error) {
if (error.statusCode === 401) {
return {

View file

@ -42,7 +42,7 @@ export async function dhlApiRequest(this: IHookFunctions | IExecuteFunctions | I
}
}
export async function validateCrendetials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject): Promise<any> { // tslint:disable-line:no-any
export async function validateCredentials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject): Promise<any> { // tslint:disable-line:no-any
const credentials = decryptedCredentials;
const { apiKey } = credentials as {

View file

@ -16,7 +16,7 @@ import {
import {
dropcontactApiRequest,
validateCrendetials,
validateCredentials,
} from './GenericFunction';
export class Dropcontact implements INodeType {
@ -273,7 +273,7 @@ export class Dropcontact implements INodeType {
credentialTest: {
async dropcontactApiCredentialTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult> {
try {
await validateCrendetials.call(this, credential.data as ICredentialDataDecryptedObject);
await validateCredentials.call(this, credential.data as ICredentialDataDecryptedObject);
} catch (error) {
return {
status: 'Error',

View file

@ -57,7 +57,7 @@ export async function dropcontactApiRequest(
}
}
export async function validateCrendetials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject): Promise<any> { // tslint:disable-line:no-any
export async function validateCredentials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject): Promise<any> { // tslint:disable-line:no-any
const credentials = decryptedCredentials;
const { apiKey } = credentials as {

View file

@ -227,7 +227,7 @@ export function qsSetStatus(status: string) {
// Validation -----------------------------------------------------------------------
export async function validateCrendetials(
export async function validateCredentials(
this: ICredentialTestFunctions,
decryptedCredentials: ICredentialDataDecryptedObject,
): Promise<IHaloPSATokens> {

View file

@ -31,7 +31,7 @@ import {
haloPSAApiRequestAllItems,
qsSetStatus,
simplifyHaloPSAGetOutput,
validateCrendetials,
validateCredentials,
} from './GenericFunctions';
export class HaloPSA implements INodeType {
@ -201,7 +201,7 @@ export class HaloPSA implements INodeType {
credential: ICredentialsDecrypted,
): Promise<INodeCredentialTestResult> {
try {
await validateCrendetials.call(this, credential.data as ICredentialDataDecryptedObject);
await validateCredentials.call(this, credential.data as ICredentialDataDecryptedObject);
} catch (error) {
return {
status: 'Error',

View file

@ -69,7 +69,7 @@ export async function linearApiRequestAllItems(this: IHookFunctions | IExecuteFu
return returnData;
}
export async function validateCrendetials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject): Promise<any> { // tslint:disable-line:no-any
export async function validateCredentials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject): Promise<any> { // tslint:disable-line:no-any
const credentials = decryptedCredentials;
const options: OptionsWithUri = {

View file

@ -20,7 +20,7 @@ import {
linearApiRequest,
linearApiRequestAllItems,
sort,
validateCrendetials,
validateCredentials,
} from './GenericFunctions';
import {
@ -79,7 +79,7 @@ export class Linear implements INodeType {
credentialTest: {
async linearApiTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult> {
try {
await validateCrendetials.call(this, credential.data as ICredentialDataDecryptedObject);
await validateCredentials.call(this, credential.data as ICredentialDataDecryptedObject);
} catch (error) {
const { error: err } = error as JsonObject;
const errors = (err as IDataObject).errors as [{ extensions: { code: string } }];

View file

@ -711,7 +711,7 @@ export function getConditions() {
return elements;
}
export function validateCrendetials(this: ICredentialTestFunctions, credentials: ICredentialDataDecryptedObject) {
export function validateCredentials(this: ICredentialTestFunctions, credentials: ICredentialDataDecryptedObject) {
const options: OptionsWithUri = {
headers: {
'Authorization': `Bearer ${credentials.apiKey}`,

View file

@ -30,7 +30,7 @@ import {
notionApiRequest,
notionApiRequestAllItems,
simplifyObjects,
validateCrendetials,
validateCredentials,
validateJSON,
} from '../GenericFunctions';
@ -198,7 +198,7 @@ export class NotionV2 implements INodeType {
credentialTest: {
async notionApiCredentialTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult> {
try {
await validateCrendetials.call(this, credential.data as ICredentialDataDecryptedObject);
await validateCredentials.call(this, credential.data as ICredentialDataDecryptedObject);
} catch (error) {
return {
status: 'Error',