v1.18.x
barisusakli 9 years ago
parent e0155534d5
commit e694bd8ab5

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

@ -20,14 +20,16 @@ module.exports = function(SocketTopics) {
return callback(new Error('[[error:invalid-data]]'));
}
var start = parseInt(data.after, 10),
stop = start + 99;
var start = parseInt(data.after, 10);
var stop = start + 99;
topics.getTags(start, stop, function(err, tags) {
if (err) {
return callback(err);
}
tags = tags.filter(function(tag) {
return tag && tag.score > 0;
});
callback(null, {tags: tags, nextStart: stop + 1});
});
};

Loading…
Cancel
Save