|
@ -89,12 +89,15 @@ io.sockets.on('connection', function(socket){ |
|
|
var parsedLb = JSON.parse(lb); |
|
|
var parsedLb = JSON.parse(lb); |
|
|
if( typeof docs[0] != "undefined" ){ |
|
|
if( typeof docs[0] != "undefined" ){ |
|
|
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){ |
|
|
leaderBoards.insert(parsedLb); |
|
|
leaderBoards.insert(parsedLb); |
|
|
console.log("Saving stats report."); |
|
|
console.log("Saving stats report."); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
leaderBoards.insert(parsedLb); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
//
|
|
|
//
|
|
|