refactor(core): Move typeorm operators from SourceControlExportService to repositories (no-changelog) (#8168)

Follow-up to: #8165
This commit is contained in:
Iván Ovejero
2023-12-28 09:27:38 +01:00
committed by GitHub
parent ea7e76fa3b
commit 5aee7a1d48
4 changed files with 33 additions and 23 deletions

View File

@@ -28,4 +28,17 @@ export class SharedWorkflowRepository extends Repository<SharedWorkflow> {
});
return sharedWorkflows.map((sharing) => sharing.workflowId);
}
async findByWorkflowIds(workflowIds: string[]) {
return this.find({
relations: ['role', 'user'],
where: {
role: {
name: 'owner',
scope: 'workflow',
},
workflowId: In(workflowIds),
},
});
}
}