mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
Allowing custom date range to be supplied in pageviews graph, closes #5541
This commit is contained in:
@@ -211,10 +211,12 @@ SocketAdmin.analytics.get = function (socket, data, callback) {
|
||||
}
|
||||
|
||||
// Default returns views from past 24 hours, by hour
|
||||
if (data.units === 'days') {
|
||||
data.amount = 30;
|
||||
} else {
|
||||
data.amount = 24;
|
||||
if (!data.amount) {
|
||||
if (data.units === 'days') {
|
||||
data.amount = 30;
|
||||
} else {
|
||||
data.amount = 24;
|
||||
}
|
||||
}
|
||||
|
||||
if (data.graph === 'traffic') {
|
||||
|
||||
Reference in New Issue
Block a user