From 885576a7466be93e9ded7bdfba953d6484f944cf Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 23 Sep 2024 02:56:39 +0200 Subject: [PATCH] download index --- lib/apiswagger.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()