tag changes

This commit is contained in:
barisusakli
2016-09-15 23:46:47 +03:00
parent 282a0b0030
commit c98b6b7630
2 changed files with 2 additions and 4 deletions

View File

@@ -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,

View File

@@ -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);
}