mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Trim down the response on the Workflows listing endpoint (#4726)
* fix: Avoid hashing workflows in the listing page * stop returning full nodes data on the listings page when sharing is enabled * fix the relations array for workflow listing * add a comment explaining the hash skipping hack
This commit is contained in:
committed by
GitHub
parent
39a5dc57a8
commit
1579d05fd1
@@ -97,10 +97,9 @@ EEWorkflowController.get(
|
||||
);
|
||||
}
|
||||
|
||||
return EEWorkflows.addCredentialsToWorkflow(
|
||||
EEWorkflows.addOwnerAndSharings(workflow),
|
||||
req.user,
|
||||
);
|
||||
EEWorkflows.addOwnerAndSharings(workflow);
|
||||
await EEWorkflows.addCredentialsToWorkflow(workflow, req.user);
|
||||
return workflow;
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -200,9 +199,12 @@ EEWorkflowController.get(
|
||||
)) as unknown as WorkflowEntity[];
|
||||
|
||||
return Promise.all(
|
||||
workflows.map(async (workflow) =>
|
||||
EEWorkflows.addCredentialsToWorkflow(EEWorkflows.addOwnerAndSharings(workflow), req.user),
|
||||
),
|
||||
workflows.map(async (workflow) => {
|
||||
EEWorkflows.addOwnerAndSharings(workflow);
|
||||
await EEWorkflows.addCredentialsToWorkflow(workflow, req.user);
|
||||
workflow.nodes = [];
|
||||
return workflow;
|
||||
}),
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user