Skip to content

Commit

Permalink
WIP: tune-in filters
Browse files Browse the repository at this point in the history
  • Loading branch information
manelcecs committed Nov 13, 2023
1 parent ed9d0bd commit 33bdcdd
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Database } from '@unocha/hpc-api-core/src/db';
import { Cond, Op } from '@unocha/hpc-api-core/src/db/util/conditions';
import { Op } from '@unocha/hpc-api-core/src/db/util/conditions';
import { Service } from 'typedi';
import { FlowObjectService } from '../../../flow-object/flow-object-service';
import { FlowService } from '../../flow-service';
Expand Down Expand Up @@ -42,7 +42,7 @@ export class FlowObjectFiltersStrategy implements FlowSearchStrategy {
// Combine conditions from flowObjects FlowIDs and flow conditions
const mergedFlowConditions = {
...flowEntityConditions,
flowID: {
id: {
[Op.IN]: flowIDsFromFilteredFlowObjects,
},
};
Expand Down Expand Up @@ -80,15 +80,15 @@ export class FlowObjectFiltersStrategy implements FlowSearchStrategy {
for (const [refDirection, objectIDs] of refDirectionMap) {
flowObjectWhere = {
...flowObjectWhere,
objectID: {
[Op.IN]: objectIDs,
},
refDirection: {
[Op.IN]: refDirection,
},
objectType: {
[Op.IN]: objectType,
},
objectID: {
[Op.IN]: objectIDs,
},
refDirection: {
[Op.LIKE]: refDirection,
},
objectType: {
[Op.LIKE]: objectType,
},
};
}
}
Expand Down

0 comments on commit 33bdcdd

Please sign in to comment.