delete topic post sorted sets on topic purge

This commit is contained in:
barisusakli
2015-01-10 17:47:31 -05:00
parent 5414c268a0
commit 23f450adbd
2 changed files with 6 additions and 9 deletions

View File

@@ -218,14 +218,7 @@ module.exports = function(Topics) {
};
Topics.removePostFromTopic = function(tid, pid, callback) {
async.parallel([
function (next) {
db.sortedSetRemove('tid:' + tid + ':posts', pid, next);
},
function (next) {
db.sortedSetRemove('tid:' + tid + ':posts:votes', pid, next);
}
], function(err, results) {
db.sortedSetsRemove(['tid:' + tid + ':posts', 'tid:' + tid + ':posts:votes'], pid, function(err) {
if (err) {
return callback(err);
}