From 73942fe8d2cb87893644092ec951867ff971bddc Mon Sep 17 00:00:00 2001 From: mahdihty Date: Tue, 16 Mar 2021 18:06:20 +0330 Subject: [PATCH] some minor change --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 23a6872..4240aef 100644 --- a/index.js +++ b/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');