diff --git a/lib/apiswagger.js b/lib/apiswagger.js index de6b92c..a24c31a 100644 --- a/lib/apiswagger.js +++ b/lib/apiswagger.js @@ -476,7 +476,7 @@ module.exports = (app, client) => { ]) result.on('readable', () => res.write('[')) pipeline.on('data', data => res.write(data.toString() + ',')) - pipeline.on('finish', () => res.end(']')) + pipeline.on('end', () => res.end(']')) result.pipe(pipeline) } else { res.status(404).end()