diff --git a/api/controllers/TagController.js b/api/controllers/TagController.js index 624d664..d28cac4 100644 --- a/api/controllers/TagController.js +++ b/api/controllers/TagController.js @@ -25,13 +25,15 @@ module.exports = { } page = ((req.query.page != undefined) ? +req.query.page : 1); - Tag.find(q).paginate({page: page, limit: 10}).exec(function(err, items) { + // TODO: find a way to rank it, so it's easier to tag + Tag.find(q).paginate({page: page, limit: 20}).exec(function(err, items) { if (format == 'long') { res.send(items); } else { var tags = []; for (var ind in items) { - tags.push(items[ind].name); + var text = items[ind].name; + tags.push({id: text, name: text}); } res.send(tags); }