feat: Return scopes on executions (no-changelog) (#10310)
This commit is contained in:
@@ -61,4 +61,12 @@ export class ProjectRelationRepository extends Repository<ProjectRelation> {
|
||||
|
||||
return [...new Set(rows.map((r) => r.userId))];
|
||||
}
|
||||
|
||||
async findAllByUser(userId: string) {
|
||||
return await this.find({
|
||||
where: {
|
||||
userId,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,4 +200,13 @@ export class SharedWorkflowRepository extends Repository<SharedWorkflow> {
|
||||
})
|
||||
)?.project;
|
||||
}
|
||||
|
||||
async getRelationsByWorkflowIdsAndProjectIds(workflowIds: string[], projectIds: string[]) {
|
||||
return await this.find({
|
||||
where: {
|
||||
workflowId: In(workflowIds),
|
||||
projectId: In(projectIds),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user