From c945c2e4e0b2f8a7121a1afa8d2af758f2805c6a Mon Sep 17 00:00:00 2001 From: Jeremy Cunningham Date: Tue, 20 Nov 2018 22:23:05 -0600 Subject: [PATCH] Fix syntax errors in websocket.js --- lib/server/websocket.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/server/websocket.js b/lib/server/websocket.js index 41672f2f2585..11451a505865 100644 --- a/lib/server/websocket.js +++ b/lib/server/websocket.js @@ -226,8 +226,8 @@ function init (env, ctx, server) { return; } + var objId = new ObjectID(data._id); ctx.store.collection(collection).update( - var objId = new ObjectID(data._id); { '_id': objId }, { $unset: data.data } ); @@ -326,8 +326,8 @@ function init (env, ctx, server) { if (err || array.length > 0) { console.log(LOG_DEDUP + 'Found similiar', array[0]); array[0].created_at = data.data.created_at; + var objId = new ObjectID(array[0]._id); ctx.store.collection(collection).update( - var objId = new ObjectID(array[0]._id); { '_id': objId }, { $set: {created_at: data.data.created_at} } ); @@ -412,8 +412,8 @@ function init (env, ctx, server) { return; } + var objId = new ObjectID(data._id); ctx.store.collection(collection).remove( - var objId = new ObjectID(data._id); { '_id': objId } );