mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
user js refactor, category fix
if a category that didn't exist was request with category/1231 or api/category/1231 it was crashing.
This commit is contained in:
@@ -186,10 +186,8 @@ Sockets.logoutUser = function(uid) {
|
||||
};
|
||||
|
||||
Sockets.emitUserCount = function() {
|
||||
db.getObjectField('global', 'userCount', function(err, count) {
|
||||
io.sockets.emit('user.count', err?{message:err.message}:null, {
|
||||
count: count
|
||||
});
|
||||
user.count(function(err, count) {
|
||||
io.sockets.emit('user.count', err ? {message:err.message} : null, count);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user