Skip to content

Commit d7a9fa8

Browse files
committed
Update sift package & syntax changes
1 parent b39b006 commit d7a9fa8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/service-module/service-module.getters.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ eslint
55
*/
66
import sift from 'sift'
77
import { _ } from '@feathersjs/commons'
8-
import dbCommons from '@feathersjs/adapter-commons'
8+
import { filterQuery, sorter, select } from '@feathersjs/adapter-commons'
99
import { globalModels as models } from './global-models'
1010
import _get from 'lodash/get'
1111
import _omit from 'lodash/omit'
1212

13-
const { filterQuery, sorter, select } = dbCommons
1413
const FILTERS = ['$sort', '$limit', '$skip', '$select']
1514
const OPERATORS = ['$in', '$nin', '$lt', '$lte', '$gt', '$gte', '$ne', '$or']
1615
const additionalOperators = ['$elemMatch']
@@ -44,7 +43,7 @@ export default function makeServiceGetters() {
4443
}
4544

4645
//@ts-ignore
47-
values = sift(query, values)
46+
values = values.filter(sift(query))
4847

4948
const total = values.length
5049

0 commit comments

Comments
 (0)