mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
feat: add ap pageviews analytics
This commit is contained in:
@@ -91,7 +91,7 @@ async function getLatestVersion() {
|
||||
dashboardController.getAnalytics = async (req, res, next) => {
|
||||
// Basic validation
|
||||
const validUnits = ['days', 'hours'];
|
||||
const validSets = ['uniquevisitors', 'pageviews', 'pageviews:registered', 'pageviews:bot', 'pageviews:guest'];
|
||||
const validSets = ['uniquevisitors', 'pageviews', 'pageviews:registered', 'pageviews:bot', 'pageviews:guest', 'pageviews:ap'];
|
||||
const until = req.query.until ? new Date(parseInt(req.query.until, 10)) : Date.now();
|
||||
const count = req.query.count || (req.query.units === 'hours' ? 24 : 30);
|
||||
if (isNaN(until) || !validUnits.includes(req.query.units)) {
|
||||
|
||||
Reference in New Issue
Block a user