mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
display user post topic stats in admin index
This commit is contained in:
@@ -39,29 +39,6 @@ SocketAdmin.restart = function(socket, data, callback) {
|
||||
meta.restart();
|
||||
};
|
||||
|
||||
SocketAdmin.getVisitorCount = function(socket, data, callback) {
|
||||
var terms = {
|
||||
day: 86400000,
|
||||
week: 604800000,
|
||||
month: 2592000000
|
||||
};
|
||||
var now = Date.now();
|
||||
async.parallel({
|
||||
day: function(next) {
|
||||
db.sortedSetCount('ip:recent', now - terms.day, now, next);
|
||||
},
|
||||
week: function(next) {
|
||||
db.sortedSetCount('ip:recent', now - terms.week, now, next);
|
||||
},
|
||||
month: function(next) {
|
||||
db.sortedSetCount('ip:recent', now - terms.month, now, next);
|
||||
},
|
||||
alltime: function(next) {
|
||||
db.sortedSetCount('ip:recent', 0, now, next);
|
||||
}
|
||||
}, callback);
|
||||
};
|
||||
|
||||
SocketAdmin.fireEvent = function(socket, data, callback) {
|
||||
index.server.sockets.emit(data.name, data.payload || {});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user