use sortedSetsRemove to remove tid from tags

v1.18.x
barisusakli 11 years ago
parent fd12ec763a
commit 78509b4ad0

@ -116,9 +116,11 @@ module.exports = function(Topics) {
db.delete('topic:' + tid + ':tags', next); db.delete('topic:' + tid + ':tags', next);
}, },
function(next) { function(next) {
async.each(tags, function(tag, next) { var sets = tags.map(function(tag) {
db.sortedSetRemove('tag:' + tag + ':topics', tid, next); return 'tag:' + tag + ':topics';
}, next); });
db.sortedSetsRemove(sets, tid, next);
} }
], callback); ], callback);
}); });

Loading…
Cancel
Save