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