feat: Implement onlyOwnedFlows filter to get flows API endpoint
This commit is contained in:
@@ -531,7 +531,7 @@ class User extends Base {
|
||||
return folders.map((folder) => folder.id);
|
||||
}
|
||||
|
||||
getFlows({ folderId, name, status }, ownedFolderIds) {
|
||||
getFlows({ folderId, name, status, onlyOwnedFlows }, ownedFolderIds) {
|
||||
return this.authorizedFlows
|
||||
.clone()
|
||||
.withGraphFetched({
|
||||
@@ -548,6 +548,10 @@ class User extends Base {
|
||||
builder.where('flows.active', false);
|
||||
}
|
||||
|
||||
if (onlyOwnedFlows) {
|
||||
builder.where('flows.user_id', this.id);
|
||||
}
|
||||
|
||||
if (folderId === 'null') {
|
||||
builder
|
||||
.whereNull('flows.folder_id')
|
||||
|
||||
Reference in New Issue
Block a user