refactor blockcount
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
ale 2024-11-15 21:05:18 +01:00
parent 1fcadc150d
commit 7ba3ea658f

View File

@ -473,12 +473,12 @@ module.exports = (app, client) => {
parser(), parser(),
pick({ filter: 'hits.hits' }), pick({ filter: 'hits.hits' }),
streamArray(), streamArray(),
data => ({ instance: data.value._source.instance, comment: data.value._source.blocks.find(block => block.domain === clean(req.params.instance)).comment }), data => ({ instance: data.value._source.instance, comment: data.value._source.blocks.find(block => block.domain === clean(req.params.instance)).comment })
stringer()
]) ])
res.once('data', data => '[' + data.toString()) result.on('readable', () => res.write('['))
res.on('finish', () => res.end(']')) pipeline.on('data', data => res.write(data.toString() + ','))
result.pipe(pipeline).pipe(res) pipeline.on('finish', () => res.end(']'))
result.pipe(pipeline)
} else { } else {
res.status(404).end() res.status(404).end()
} }