mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)
This commit is contained in:
@@ -8,6 +8,10 @@ import { flow } from 'lodash';
|
||||
|
||||
import type { Zammad } from './types';
|
||||
|
||||
export function tolerateTrailingSlash(url: string) {
|
||||
return url.endsWith('/') ? url.substr(0, url.length - 1) : url;
|
||||
}
|
||||
|
||||
export async function zammadApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
@@ -105,10 +109,6 @@ export async function zammadApiRequestAllItems(
|
||||
return returnData;
|
||||
}
|
||||
|
||||
export function tolerateTrailingSlash(url: string) {
|
||||
return url.endsWith('/') ? url.substr(0, url.length - 1) : url;
|
||||
}
|
||||
|
||||
export function throwOnEmptyUpdate(this: IExecuteFunctions, resource: string) {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
@@ -120,12 +120,12 @@ export function throwOnEmptyUpdate(this: IExecuteFunctions, resource: string) {
|
||||
// loadOptions utils
|
||||
// ----------------------------------
|
||||
|
||||
export const prettifyDisplayName = (fieldName: string) => fieldName.replace('name', ' Name');
|
||||
|
||||
export const fieldToLoadOption = (i: Zammad.Field) => {
|
||||
return { name: i.display ? prettifyDisplayName(i.display) : i.name, value: i.name };
|
||||
};
|
||||
|
||||
export const prettifyDisplayName = (fieldName: string) => fieldName.replace('name', ' Name');
|
||||
|
||||
export const isCustomer = (user: Zammad.User) =>
|
||||
user.role_ids.includes(3) && !user.email.endsWith('@zammad.org');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user