v1.18.x
Barış Soner Uşaklı 8 years ago
parent c133efa258
commit fb45b498a2

@ -9,13 +9,15 @@ module.exports = function (Topics) {
count = parseInt(count, 10) || 20; count = parseInt(count, 10) || 20;
if (term === 'alltime') { if (term === 'alltime') {
return getAllTimePopular(uid, count, function (err, topics) { async.waterfall([
if (err) { function (next) {
return callback(err); getAllTimePopular(uid, count, next);
},
function (topics, next) {
sortTiedTopicsByViews(topics, next);
} }
], callback);
sortTiedTopicsByViews(topics, callback); return;
});
} }
async.waterfall([ async.waterfall([

Loading…
Cancel
Save