|
@ -52,7 +52,7 @@ io.on('connection', async (socket) => { |
|
|
// });
|
|
|
// });
|
|
|
|
|
|
|
|
|
app.post('/emit/:room', function (req, res) { |
|
|
app.post('/emit/:room', function (req, res) { |
|
|
console.log(req.body); |
|
|
|
|
|
|
|
|
// console.log(req.body);
|
|
|
io.to('room-' + req.params.room).emit('room-event', req.body.data.title); |
|
|
io.to('room-' + req.params.room).emit('room-event', req.body.data.title); |
|
|
res.send('done'); |
|
|
res.send('done'); |
|
|
}); |
|
|
}); |
|
|