From c98b6b7630493f16e174e030c356a41d4e78351c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 15 Sep 2016 23:46:47 +0300 Subject: [PATCH] tag changes --- src/controllers/tags.js | 4 +--- src/topics/tags.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/tags.js b/src/controllers/tags.js index b6345bc840..ba1ec919b2 100644 --- a/src/controllers/tags.js +++ b/src/controllers/tags.js @@ -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, diff --git a/src/topics/tags.js b/src/topics/tags.js index ee5f7d8b9d..f7a38ca583 100644 --- a/src/topics/tags.js +++ b/src/topics/tags.js @@ -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); }