|
|
@ -262,6 +262,10 @@ var RDB = require('./redis.js'),
|
|
|
|
|
|
|
|
|
|
|
|
Categories.getRecentReplies = function(cid, callback) {
|
|
|
|
Categories.getRecentReplies = function(cid, callback) {
|
|
|
|
RDB.zrange('categories:recent_posts:cid:' + cid, 0, -1, function(err, pids) {
|
|
|
|
RDB.zrange('categories:recent_posts:cid:' + cid, 0, -1, function(err, pids) {
|
|
|
|
|
|
|
|
if (pids.length == 0) {
|
|
|
|
|
|
|
|
callback(false);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
posts.getPostSummaryByPids(pids, function(posts) {
|
|
|
|
posts.getPostSummaryByPids(pids, function(posts) {
|
|
|
|
callback(posts);
|
|
|
|
callback(posts);
|
|
|
|
});
|
|
|
|
});
|
|
|
|