diff --git a/lib/apiswagger.js b/lib/apiswagger.js index 59c8724..8efe53c 100644 --- a/lib/apiswagger.js +++ b/lib/apiswagger.js @@ -512,7 +512,8 @@ module.exports = (app, client) => { match_all: {} } }, { asStream: true }) - result.pipe(chain([ + chain([ + result, parser(), streamValues(), data => [data.value.hits.hits.map(hit => ({ @@ -523,7 +524,7 @@ module.exports = (app, client) => { nodeinfo: hit._source.nodeinfo }))], zlib.createGzip() - ])).pipe(res, { end: true }) + ]).pipe(res, { end: true }) } catch (e) { console.error(e) res.status(404).end()