crashing a lot less now, heh

This commit is contained in:
Julian Lam
2014-01-09 21:27:50 -05:00
parent adb8f80b86
commit dfa9f203e6
8 changed files with 81 additions and 190 deletions

View File

@@ -667,13 +667,13 @@ var bcrypt = require('bcrypt'),
});
};
User.count = function(socket) {
User.count = function(callback) {
db.getObjectField('global', 'userCount', function(err, count) {
if(err) {
return;
}
socket.emit('user.count', {
callback({
count: count ? count : 0
});
});