tag changes

v1.18.x
barisusakli 8 years ago
parent 282a0b0030
commit c98b6b7630

@ -82,9 +82,7 @@ tagsController.getTags = function(req, res, next) {
if (err) { if (err) {
return next(err); return next(err);
} }
tags = tags.filter(function(tag) { tags = tags.filter(Boolean);
return tag && tag.score > 0;
});
var data = { var data = {
tags: tags, tags: tags,
nextStart: 100, nextStart: 100,

@ -64,7 +64,7 @@ module.exports = function(Topics) {
}, },
function(isMember, next) { function(isMember, next) {
if (isMember) { if (isMember) {
return callback(new Error('[[error:tag-exists]]')); return next();
} }
db.sortedSetAdd('tags:topic:count', 0, tag, next); db.sortedSetAdd('tags:topic:count', 0, tag, next);
} }

Loading…
Cancel
Save