From 9f4c3aaa8aa749af52cede8e472d9be6e9cb86be Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 23 Sep 2024 04:44:36 +0200 Subject: [PATCH] download index --- lib/apiswagger.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/apiswagger.js b/lib/apiswagger.js index 794b99b..7d391f0 100644 --- a/lib/apiswagger.js +++ b/lib/apiswagger.js @@ -513,8 +513,7 @@ module.exports = (app, client) => { match_all: {} } }, { asStream: true }) - chain([ - result, + result.pipe(chain([ parser(), data => data.value.hits.hits, streamArray(), @@ -527,7 +526,7 @@ module.exports = (app, client) => { }), stringer(), zlib.createGzip() - ]).pipe(res, { end: true }) + ])).pipe(res, { end: true }) } catch (e) { console.error(e) res.status(404).end()