This commit is contained in:
parent
1fcadc150d
commit
7ba3ea658f
@ -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()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user