mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Impose import/order linting rule across nodes packages (no-changelog) (#12314)
This commit is contained in:
committed by
GitHub
parent
8c635993bd
commit
bafac73eb5
@@ -1,3 +1,4 @@
|
||||
import flow from 'lodash/flow';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
IDataObject,
|
||||
@@ -8,8 +9,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import flow from 'lodash/flow';
|
||||
|
||||
import type { Zammad } from './types';
|
||||
|
||||
export function tolerateTrailingSlash(url: string) {
|
||||
@@ -34,9 +33,8 @@ export async function zammadApiRequest(
|
||||
const authentication = this.getNodeParameter('authentication', 0) as 'basicAuth' | 'tokenAuth';
|
||||
|
||||
if (authentication === 'basicAuth') {
|
||||
const credentials = (await this.getCredentials(
|
||||
'zammadBasicAuthApi',
|
||||
)) as Zammad.BasicAuthCredentials;
|
||||
const credentials =
|
||||
await this.getCredentials<Zammad.BasicAuthCredentials>('zammadBasicAuthApi');
|
||||
|
||||
const baseUrl = tolerateTrailingSlash(credentials.baseUrl);
|
||||
|
||||
@@ -49,9 +47,8 @@ export async function zammadApiRequest(
|
||||
|
||||
options.rejectUnauthorized = !credentials.allowUnauthorizedCerts;
|
||||
} else {
|
||||
const credentials = (await this.getCredentials(
|
||||
'zammadTokenAuthApi',
|
||||
)) as Zammad.TokenAuthCredentials;
|
||||
const credentials =
|
||||
await this.getCredentials<Zammad.TokenAuthCredentials>('zammadTokenAuthApi');
|
||||
|
||||
const baseUrl = tolerateTrailingSlash(credentials.baseUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user