mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-09 09:02:48 +01:00
use sortedSetsRemove to remove tid from tags
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user