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

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