mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-15 17:37:21 +02:00
perf(core): Improvements to GET /workflows endpoint (#17086)
This commit is contained in:
@@ -211,9 +211,30 @@ export = {
|
||||
where.id = In(workflowsIds);
|
||||
}
|
||||
|
||||
const selectFields: (keyof WorkflowEntity)[] = [
|
||||
'id',
|
||||
'name',
|
||||
'active',
|
||||
'createdAt',
|
||||
'updatedAt',
|
||||
'isArchived',
|
||||
'nodes',
|
||||
'connections',
|
||||
'settings',
|
||||
'staticData',
|
||||
'meta',
|
||||
'versionId',
|
||||
'triggerCount',
|
||||
];
|
||||
|
||||
if (!excludePinnedData) {
|
||||
selectFields.push('pinData');
|
||||
}
|
||||
|
||||
const [workflows, count] = await Container.get(WorkflowRepository).findAndCount({
|
||||
skip: offset,
|
||||
take: limit,
|
||||
select: selectFields,
|
||||
where,
|
||||
...(!Container.get(GlobalConfig).tags.disabled && { relations: ['tags'] }),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user