File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { MixinTarget } from '@loopback/core' ;
22import { CrudRepository , Model } from '@loopback/repository' ;
33import expect from 'expect-runtime' ;
4- import { buildFilterQuery } from '../js/buildFilterQuery' ;
5- import { utils } from '../js/utils' ;
64
5+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
76export function UtilsRepositoryMixin <
87 M extends Model ,
98 R extends MixinTarget < CrudRepository < M > > ,
109> ( superClass : R ) {
1110 return class extends superClass {
11+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1212 [ x : string ] : any ;
1313 // put the shared code here
1414 async getEntityIdsByOrganizationId (
@@ -80,13 +80,11 @@ export function UtilsRepositoryMixin<
8080 const planterIds = await this . getNonOrganizationPlanterIds ( ) ;
8181 // if planter repository request
8282 if ( model === 'planter' ) {
83- return {
84- or : [ { organizationId : null } , { id : { inq : planterIds } } ] ,
85- } ;
83+ return { id : { inq : planterIds } } ;
8684 } else {
8785 // if trees or other repository request
8886 return {
89- or : [
87+ and : [
9088 { plantingOrganizationId : null } ,
9189 { planterId : { inq : planterIds } } ,
9290 ] ,
You can’t perform that action at this time.
0 commit comments