Nochmal
This commit is contained in:
parent
36e5acb7e9
commit
af8547b3d6
6
index.js
6
index.js
@ -34,6 +34,9 @@ wss.on("connection", function connection(ws) {
|
||||
|
||||
ws.on("message", function message(data, isBinary) {
|
||||
console.log("received a new message");
|
||||
|
||||
try {
|
||||
let message = JSON.parse(data);
|
||||
if (
|
||||
message.filter &&
|
||||
message.filter._id &&
|
||||
@ -46,9 +49,6 @@ wss.on("connection", function connection(ws) {
|
||||
console.error("Invalid ObjectId in filter:", e);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
let message = JSON.parse(data);
|
||||
console.log("message action is " + message.action);
|
||||
|
||||
switch (message.action) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user