This commit is contained in:
barisusakli
2014-11-07 17:15:01 -05:00
parent d77bd638c4
commit 1ae39d638a
10 changed files with 101 additions and 28 deletions

View File

@@ -87,7 +87,7 @@ module.exports = function(Posts) {
return callback(err);
}
db.sortedSetRemove('categories:recent_posts:cid:' + cid, pid, callback);
db.sortedSetRemove('cid:' + cid + ':pids', pid, callback);
});
}
@@ -97,7 +97,7 @@ module.exports = function(Posts) {
return callback(err);
}
db.sortedSetAdd('categories:recent_posts:cid:' + cid, timestamp, pid, callback);
db.sortedSetAdd('cid:' + cid + ':pids', timestamp, pid, callback);
});
}
@@ -180,7 +180,7 @@ module.exports = function(Posts) {
}
var sets = cids.map(function(cid) {
return 'categories:recent_posts:cid:' + cid;
return 'cid:' + cid + ':pids';
});
db.sortedSetsRemove(sets, pid, callback);