Browse Source

some minor change

mahdi
mahdihty 4 years ago
parent
commit
73942fe8d2
  1. 4
      index.js

4
index.js

@ -60,8 +60,8 @@ io.on('connection', async (socket) => {
app.post('/emit/:room', function (req, res) {
// console.log(req.body);
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);
// res.json(req.body.data)
res.send('done');

Loading…
Cancel
Save