From 0d3bf4be19a4b36c28c1363ec072fd9ce6441412 Mon Sep 17 00:00:00 2001 From: ale Date: Fri, 15 Nov 2024 21:11:15 +0100 Subject: [PATCH] refactor blockcount --- lib/apiswagger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apiswagger.js b/lib/apiswagger.js index a24c31a..261cbc9 100644 --- a/lib/apiswagger.js +++ b/lib/apiswagger.js @@ -474,7 +474,7 @@ module.exports = (app, client) => { streamArray(), data => ({ instance: data.value._source.instance, comment: data.value._source.blocks.find(block => block.domain === clean(req.params.instance)).comment }) ]) - result.on('readable', () => res.write('[')) + pipeline.on('readable', () => res.write('[')) pipeline.on('data', data => res.write(data.toString() + ',')) pipeline.on('end', () => res.end(']')) result.pipe(pipeline)