move category pageview to controllers

so topic views are tracked as category views
This commit is contained in:
Barış Soner Uşaklı
2018-06-01 14:57:59 -04:00
parent 1d5a0eaf13
commit d31d8fa806
4 changed files with 6 additions and 12 deletions

View File

@@ -13,6 +13,7 @@ var pagination = require('../pagination');
var helpers = require('./helpers');
var utils = require('../utils');
var translator = require('../translator');
var analytics = require('../analytics');
var categoryController = module.exports;
@@ -144,6 +145,8 @@ categoryController.get = function (req, res, callback) {
res.locals.linkTags.push(rel);
});
analytics.increment(['pageviews:byCid:' + categoryData.cid]);
res.render('category', categoryData);
},
], callback);