mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-01-31 13:30:37 +00:00
added backend check
This commit is contained in:
parent
c6409f330d
commit
e79bdec70d
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ module.exports = namespace => {
|
|||
|
||||
socket.on('users:disconnect', data => {
|
||||
const id = data.id;
|
||||
if (typeof id !== 'number') return;
|
||||
if (typeof id !== 'number' || !socket._user.admin) return;
|
||||
Object.values(namespace.sockets)
|
||||
.filter(socket => socket._user.id === id)
|
||||
.forEach(socket => socket.disconnect());
|
||||
|
|
Loading…
Reference in a new issue