refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8212)
Follow-up to: https://github.com/n8n-io/n8n/pull/8186
This commit is contained in:
@@ -54,8 +54,14 @@ export class WorkflowRepository extends Repository<WorkflowEntity> {
|
||||
});
|
||||
}
|
||||
|
||||
async findByIds(workflowIds: string[]) {
|
||||
return this.find({ where: { id: In(workflowIds) } });
|
||||
async findByIds(workflowIds: string[], { fields }: { fields?: string[] } = {}) {
|
||||
const options: FindManyOptions<WorkflowEntity> = {
|
||||
where: { id: In(workflowIds) },
|
||||
};
|
||||
|
||||
if (fields?.length) options.select = fields as FindOptionsSelect<WorkflowEntity>;
|
||||
|
||||
return this.find(options);
|
||||
}
|
||||
|
||||
async getActiveTriggerCount() {
|
||||
|
||||
Reference in New Issue
Block a user