parent
6b514ecb72
commit
81cbb6fd84
1 changed files with 2 additions and 1 deletions
|
@ -40,10 +40,11 @@ const filter = (req, res, next) => {
|
||||||
|
|
||||||
const selector = Object.create(null)
|
const selector = Object.create(null)
|
||||||
for (let prop in req.query) {
|
for (let prop in req.query) {
|
||||||
|
const val = parse(req.query[prop])
|
||||||
if (prop.slice(0, 12) === 'coordinates.') { // derhuerst/db-rest#2
|
if (prop.slice(0, 12) === 'coordinates.') { // derhuerst/db-rest#2
|
||||||
prop = 'location.' + prop.slice(12)
|
prop = 'location.' + prop.slice(12)
|
||||||
}
|
}
|
||||||
selector[prop] = parse(req.query[prop])
|
selector[prop] = val
|
||||||
}
|
}
|
||||||
const filter = createFilter(selector)
|
const filter = createFilter(selector)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue