|
@ -60,8 +60,8 @@ 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);
|
|
|
console.log('room is :','room-' + req.params.room); |
|
|
console.log('room is :','room-' + req.params.room); |
|
|
console.log('message',req.body.data.title); |
|
|
|
|
|
io.to('room-' + req.params.room).emit('room-event', req.body.data.title); |
|
|
|
|
|
|
|
|
console.log('message',req.body.data); |
|
|
|
|
|
io.to('room-' + req.params.room).emit('room-event', req.body.data); |
|
|
// console.log(req.body.data);
|
|
|
// console.log(req.body.data);
|
|
|
// res.json(req.body.data)
|
|
|
// res.json(req.body.data)
|
|
|
res.send('done'); |
|
|
res.send('done'); |
|
|