mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 00:06:33 +02:00
upgrade tags to sorted set
This commit is contained in:
@@ -54,14 +54,15 @@ module.exports = function(Topics) {
|
||||
db.sortedSetAdd('topics:tid', timestamp, tid);
|
||||
plugins.fireHook('action:topic.save', tid);
|
||||
|
||||
Topics.createTags(data.tags, tid, timestamp);
|
||||
user.addTopicIdToUser(uid, tid, timestamp);
|
||||
|
||||
db.sortedSetAdd('categories:' + cid + ':tid', timestamp, tid);
|
||||
db.incrObjectField('category:' + cid, 'topic_count');
|
||||
db.incrObjectField('global', 'topicCount');
|
||||
|
||||
callback(null, tid);
|
||||
Topics.createTags(data.tags, tid, timestamp, function(err) {
|
||||
callback(err, tid);
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user