From 881af824e040f1e614f6fc0bff01885f551559a2 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Fri, 31 Jan 2020 16:33:42 +0100 Subject: [PATCH] fix /stations coordinates filter again :bug: fixes #13 again --- lib/stations.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/stations.js b/lib/stations.js index 4403bef..2b885f9 100644 --- a/lib/stations.js +++ b/lib/stations.js @@ -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 }