Commit 7b2efa8f authored by Soo Hyun Kim's avatar Soo Hyun Kim
Browse files

0126머지후

parents 650999ad 108b1b94
......@@ -7,6 +7,10 @@ const router = express.Router()
router.route('/users/signup')
.post(userCtrl.signup)
router.route('/users/check')
.get(userCtrl.checkUser)
router.route(`/users/:userId`)
.get(userCtrl.getProfile)
.put(userCtrl.profileUpload, userCtrl.update)
......
......@@ -34,12 +34,6 @@ io.on("connection", (socket) => { // 기본 연결
socket.leave(roomInfo); //클라이언트에서 data에 적힌 room정보를 브로드캐스팅 받지 않는다.
});
socket.on('newUser', (data) => {
console.log('newUser', data)
let userInfo = data.userInfo;
io.to(data.rmIf).emit('sendUser', userInfo)
})
socket.on('chat', async (data) => {
console.log('roomname확인', data)
const room = await Room.findOne({ roomId: data.roomInfo })
......@@ -48,7 +42,8 @@ io.on("connection", (socket) => { // 기본 연결
const chat = await new Chat({
room: room._id,
username: data.sendInfo.sender,
message: data.sendInfo.msg
message: data.sendInfo.msg,
profileimg: data.sendInfo.img
}).save()
console.log('resChat확인', chat)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment