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(),
pick({ filter: 'hits.hits' }),
streamArray(),
data => ({ instance: data.value._source.instance, comment: data.value._source.blocks.find(block => block.domain === clean(req.params.instance)).comment }),
stringer()
data => ({ instance: data.value._source.instance, comment: data.value._source.blocks.find(block => block.domain === clean(req.params.instance)).comment })
])
res.once('data', data => '[' + data.toString())
res.on('finish', () => res.end(']'))
result.pipe(pipeline).pipe(res)
result.on('readable', () => res.write('['))
pipeline.on('data', data => res.write(data.toString() + ','))
pipeline.on('finish', () => res.end(']'))
result.pipe(pipeline)
} else {
res.status(404).end()
}