mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(core): Use an IoC container to manage singleton classes [Part-2] (no-changelog) (#5690)
* use typedi for UserManagementMailer * use typedi for SamlService * fix typos * use typedi for Queue * use typedi for License * convert some more code to use typedi
This commit is contained in:
committed by
GitHub
parent
c07f838ce6
commit
9bd7529193
@@ -1,4 +1,5 @@
|
||||
import { In } from 'typeorm';
|
||||
import { Container } from 'typedi';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteData,
|
||||
@@ -32,7 +33,7 @@ import type { User } from '@db/entities/User';
|
||||
import { whereClause } from '@/UserManagement/UserManagementHelper';
|
||||
import omit from 'lodash.omit';
|
||||
import { PermissionChecker } from './UserManagement/PermissionChecker';
|
||||
import { Container } from 'typedi';
|
||||
import { isWorkflowIdValid } from './utils';
|
||||
|
||||
const ERROR_TRIGGER_TYPE = config.getEnv('nodes.errorTriggerType');
|
||||
|
||||
@@ -74,15 +75,6 @@ export function getDataLastExecutedNodeData(inputData: IRun): ITaskData | undefi
|
||||
return lastNodeRunData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the given id is a valid workflow id
|
||||
*
|
||||
* @param {(string | null | undefined)} id The id to check
|
||||
*/
|
||||
export function isWorkflowIdValid(id: string | null | undefined): boolean {
|
||||
return !(typeof id === 'string' && isNaN(parseInt(id, 10)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the error workflow
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user