Skip to content

Commit 3f26c76

Browse files
committed
TODO: update authorization in send()
1 parent 7542ee7 commit 3f26c76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ class SocketServer extends EventEmitter {
494494
Data = { ...data }
495495
}
496496

497+
// TODO: the following code can cause issues in client and improved approach is to check if user has permission and send or dont send
498+
// if (Data.$filter && Data.$filter.query && Data.$filter.query._id && Data.$filter.query._id.$eq === '$user_id')
499+
// delete Data.$filter.query._id
500+
501+
497502
delete Data.socket
498503
sockets[i].send(JSON.stringify(Data));
499504

0 commit comments

Comments
 (0)