From ad72ee9a80fa97e184a1126731b0624d825a5438 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Sat, 16 Dec 2017 11:47:50 +0100 Subject: [PATCH] bugfix :bug: --- lib/stations.js | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/stations.js b/lib/stations.js index 585ab12..6d1d5fe 100644 --- a/lib/stations.js +++ b/lib/stations.js @@ -4,6 +4,7 @@ const autocomplete = require('db-stations-autocomplete') const stations = require('db-stations') const parse = require('cli-native').to const createFilter = require('db-stations/create-filter') +const filterStream = require('stream-filter') const ndjson = require('ndjson') const err400 = (msg) => { @@ -31,7 +32,7 @@ const filter = (req, res, next) => { stations.full() .on('error', next) - .pipe(filter) + .pipe(filterStream.obj(filter)) .on('error', next) .pipe(ndjson.stringify()) .on('error', next) diff --git a/package.json b/package.json index ce7b3d2..2c3e0e4 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "hafas-client": "^2.0.0-alpha.3", "hafas-rest-api": "0.1.0-alpha.2", "hsts": "^2.1.0", - "ndjson": "^1.5.0" + "ndjson": "^1.5.0", + "stream-filter": "^2.1.0" }, "scripts": { "start": "node index.js"