|
@ -87,7 +87,7 @@ io.sockets.on('connection', function(socket){ |
|
|
leaderBoards.find().sort({timeStamp:-1}).limit(1, function(err, docs){ |
|
|
leaderBoards.find().sort({timeStamp:-1}).limit(1, function(err, docs){ |
|
|
|
|
|
|
|
|
var parsedLb = JSON.parse(lb); |
|
|
var parsedLb = JSON.parse(lb); |
|
|
if( typeof docs[0] != "undefined" ){ |
|
|
|
|
|
|
|
|
if( docs.length ){ |
|
|
if(typeof docs[0].timeStamp != "undefined"){ |
|
|
if(typeof docs[0].timeStamp != "undefined"){ |
|
|
|
|
|
|
|
|
if( parsedLb.timeStamp - docs[0].timeStamp > 600000){ |
|
|
if( parsedLb.timeStamp - docs[0].timeStamp > 600000){ |
|
@ -99,6 +99,9 @@ io.sockets.on('connection', function(socket){ |
|
|
leaderBoards.insert(parsedLb); |
|
|
leaderBoards.insert(parsedLb); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
if(err){ |
|
|
|
|
|
console.dir(err); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
//
|
|
|
//
|
|
|
|
|
|
|
|
|