diff --git a/server/handlers/io.js b/server/handlers/io.js index bce99aeb..0188751a 100644 --- a/server/handlers/io.js +++ b/server/handlers/io.js @@ -87,6 +87,7 @@ module.exports = function() { msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel") && typeof(msg.guid) == "string" && typeof(msg.channel) == "string" && typeof(msg.socket_id) == "string" && msg.channel != "") { db.collection("connected_users").find({"_id": msg.channel}, function(err, connected_users_channel) { + console.log("test: ", connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1, connected_users_channel.length > 0, connected_users_channel[0].users.indexOf(msg.guid) > -1) if(connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1) { socket.cookie_id = msg.guid; guid = msg.guid; diff --git a/server/routing/client/router.js b/server/routing/client/router.js index 81bd6529..76fbc1a2 100644 --- a/server/routing/client/router.js +++ b/server/routing/client/router.js @@ -34,10 +34,12 @@ try { } router.use(recaptcha.middleware.render, function(req, res, next) { + console.log("middleware render"); next(); // make sure we go to the next routes and don't stop here }); router.route('/:channel_name').get(function(req, res, next){ + console.log("channel_name get"); channel(req, res, next); }); @@ -47,10 +49,12 @@ router.route('/r/:base64data').get(function(req, res, next){ }); router.route('/').get(function(req, res, next){ + console.log("/ get"); root(req, res, next); }); router.route('/').post(function(req, res, next){ + console.log("/ post"); root(req, res, next); });