mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fix for offline-listeners overflooding total viewers
This commit is contained in:
@@ -10,7 +10,7 @@ router.route('/api/frontpages').get(function(req, res) {
|
||||
db.collection("frontpage_lists").find({frontpage: true, count: {$gt: 0}}, function(err, docs) {
|
||||
db.collection("connected_users").find({"_id": "total_users"}, function(err, tot) {
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.send(JSON.stringify({channels: docs, viewers: tot[0].total_users}));
|
||||
res.send(JSON.stringify({channels: docs, viewers: tot[0].total_users.length}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user