mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 12:01:17 +01:00
tag changes
This commit is contained in:
@@ -82,9 +82,7 @@ tagsController.getTags = function(req, res, next) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
tags = tags.filter(function(tag) {
|
||||
return tag && tag.score > 0;
|
||||
});
|
||||
tags = tags.filter(Boolean);
|
||||
var data = {
|
||||
tags: tags,
|
||||
nextStart: 100,
|
||||
|
||||
@@ -64,7 +64,7 @@ module.exports = function(Topics) {
|
||||
},
|
||||
function(isMember, next) {
|
||||
if (isMember) {
|
||||
return callback(new Error('[[error:tag-exists]]'));
|
||||
return next();
|
||||
}
|
||||
db.sortedSetAdd('tags:topic:count', 0, tag, next);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user