fix: stops stream upon conversation

This commit is contained in:
Daniel Avila 2023-03-11 21:42:08 -05:00
parent 79f050bac7
commit 23de688bf3
6 changed files with 218 additions and 120 deletions

View file

@ -0,0 +1,11 @@
module.exports = (req, res, next) => {
let { stopStream } = req.body;
if (stopStream) {
console.log('stopStream');
res.write('event: stop\ndata:\n\n');
res.end();
return;
} else {
next();
}
};