From 78509b4ad0a5a52380a61375a91c04bedda8a8a4 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 21 Jun 2014 22:43:02 -0400 Subject: [PATCH] use sortedSetsRemove to remove tid from tags --- src/topics/tags.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/topics/tags.js b/src/topics/tags.js index 8e4b85bddf..a3d3738a02 100644 --- a/src/topics/tags.js +++ b/src/topics/tags.js @@ -116,9 +116,11 @@ module.exports = function(Topics) { db.delete('topic:' + tid + ':tags', next); }, function(next) { - async.each(tags, function(tag, next) { - db.sortedSetRemove('tag:' + tag + ':topics', tid, next); - }, next); + var sets = tags.map(function(tag) { + return 'tag:' + tag + ':topics'; + }); + + db.sortedSetsRemove(sets, tid, next); } ], callback); });