refactor(core): Move more typeorm operators to repositories (no-changelog) (#8143)

Follow-up to #8139
This commit is contained in:
Iván Ovejero
2023-12-22 16:20:30 +01:00
committed by GitHub
parent 4007163651
commit a59d78de18
11 changed files with 81 additions and 55 deletions

View File

@@ -172,4 +172,11 @@ export class WorkflowRepository extends Repository<WorkflowEntity> {
return { workflows, count };
}
async findStartingWith(workflowName: string): Promise<Array<{ name: string }>> {
return this.find({
select: ['name'],
where: { name: Like(`${workflowName}%`) },
});
}
}