feat: Implement name filter for get executions API endpoint

This commit is contained in:
Faruk AYDIN
2025-03-20 15:01:02 +01:00
parent 245d127170
commit 906b8c94e9
3 changed files with 115 additions and 9 deletions

View File

@@ -566,6 +566,27 @@ class User extends Base {
.orderBy('updated_at', 'desc');
}
getExecutions({ name }) {
return this.authorizedExecutions
.clone()
.withSoftDeleted()
.joinRelated({
flow: true,
})
.withGraphFetched({
flow: {
steps: true,
},
})
.where((builder) => {
builder.withSoftDeleted();
if (name) {
builder.where('flow.name', 'ilike', `%${name}%`);
}
})
.orderBy('created_at', 'desc');
}
async getApps(name) {
const connections = await this.authorizedConnections
.clone()