bugfix 🐛

This commit is contained in:
Jannis R 2017-12-16 11:47:50 +01:00
parent 7e9b998e0f
commit ad72ee9a80
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,7 @@ const autocomplete = require('db-stations-autocomplete')
const stations = require('db-stations') const stations = require('db-stations')
const parse = require('cli-native').to const parse = require('cli-native').to
const createFilter = require('db-stations/create-filter') const createFilter = require('db-stations/create-filter')
const filterStream = require('stream-filter')
const ndjson = require('ndjson') const ndjson = require('ndjson')
const err400 = (msg) => { const err400 = (msg) => {
@ -31,7 +32,7 @@ const filter = (req, res, next) => {
stations.full() stations.full()
.on('error', next) .on('error', next)
.pipe(filter) .pipe(filterStream.obj(filter))
.on('error', next) .on('error', next)
.pipe(ndjson.stringify()) .pipe(ndjson.stringify())
.on('error', next) .on('error', next)

View file

@ -33,7 +33,8 @@
"hafas-client": "^2.0.0-alpha.3", "hafas-client": "^2.0.0-alpha.3",
"hafas-rest-api": "0.1.0-alpha.2", "hafas-rest-api": "0.1.0-alpha.2",
"hsts": "^2.1.0", "hsts": "^2.1.0",
"ndjson": "^1.5.0" "ndjson": "^1.5.0",
"stream-filter": "^2.1.0"
}, },
"scripts": { "scripts": {
"start": "node index.js" "start": "node index.js"