fix: update models

This commit is contained in:
Ante Brähler
2024-11-19 22:14:02 +00:00
parent 45781aaff0
commit b2aa6ef2da
7 changed files with 34 additions and 22 deletions

View File

@@ -30,9 +30,9 @@ const connectedUsers = {}
io.on('connection', socket => {
socket.on('new-user', name => {
connectedUsers[socket.id] = name
socket.broadcast.emit('user-connected', name)
socket.on('new-user', userId => {
connectedUsers[socket.id] = userId
socket.broadcast.emit('user-connected', userId)
})
socket.on('disconnect', () => {