ci: Fix linting issues (no-changelog) (#6788)

* ci: Fix linting (no-changelog)

* lintfix for nodes-base as well
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-28 18:28:17 +02:00
committed by GitHub
parent 4e491b754f
commit 6fb8a9ee39
40 changed files with 204 additions and 154 deletions

View File

@@ -169,8 +169,7 @@ workflowsController.get(
// Do a very basic check if it is really a n8n-workflow-json
if (
workflowData === undefined ||
workflowData.nodes === undefined ||
workflowData?.nodes === undefined ||
!Array.isArray(workflowData.nodes) ||
workflowData.connections === undefined ||
typeof workflowData.connections !== 'object' ||

View File

@@ -90,9 +90,8 @@ export class EEWorkflowsService extends WorkflowsService {
}
static addOwnerId(workflow: WorkflowForList, workflowOwnerRole: Role): void {
const ownerId = workflow.shared?.find(
({ roleId }) => String(roleId) === workflowOwnerRole.id,
)?.userId;
const ownerId = workflow.shared?.find(({ roleId }) => String(roleId) === workflowOwnerRole.id)
?.userId;
workflow.ownedBy = ownerId ? { id: ownerId } : null;
delete workflow.shared;
}