|
|
@ -87,6 +87,11 @@ var RDB = require('./redis.js'),
|
|
|
|
|
|
|
|
|
|
|
|
function getTopics(next) {
|
|
|
|
function getTopics(next) {
|
|
|
|
topics.getTopicsByTids(tids, current_user, function(topicsData) {
|
|
|
|
topics.getTopicsByTids(tids, current_user, function(topicsData) {
|
|
|
|
|
|
|
|
// Float pinned topics to the top of the list
|
|
|
|
|
|
|
|
topicsData = topicsData.sort(function(a, b) {
|
|
|
|
|
|
|
|
return parseInt(b.pinned, 10) - parseInt(a.pinned, 10);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
next(null, topicsData);
|
|
|
|
next(null, topicsData);
|
|
|
|
}, category_id);
|
|
|
|
}, category_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|