refactor(core): Update tag endpoints to use DTOs and injectable config (#12380)

This commit is contained in:
Ricardo Espinoza
2025-01-09 14:17:11 -05:00
committed by GitHub
parent 95f055d23a
commit b1a40a231b
26 changed files with 282 additions and 103 deletions

View File

@@ -42,7 +42,6 @@ import type {
} from 'n8n-workflow';
import { ActiveExecutions } from '@/active-executions';
import config from '@/config';
import { CredentialsHelper } from '@/credentials-helper';
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
import type { AiEventMap, AiEventPayload } from '@/events/maps/ai.event-map';
@@ -734,7 +733,7 @@ export async function getWorkflowData(
let workflowData: IWorkflowBase | null;
if (workflowInfo.id !== undefined) {
const relations = config.getEnv('workflowTagsDisabled') ? [] : ['tags'];
const relations = Container.get(GlobalConfig).tags.disabled ? [] : ['tags'];
workflowData = await Container.get(WorkflowRepository).get(
{ id: workflowInfo.id },