You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
389 B
JavaScript

'use strict';
var async = require('async');
var recentController = require('./recent');
var topController = module.exports;
topController.get = function (req, res, next) {
async.waterfall([
function (next) {
recentController.getData(req, 'top', 'votes', next);
},
function (data, next) {
if (!data) {
return next();
}
res.render('top', data);
},
], next);
};