From 7a8cdfc0955719cb0c137570cbb46eacacef5290 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 19 Aug 2015 01:16:30 -0400 Subject: [PATCH] added core field --- src/controllers/users.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/controllers/users.js b/src/controllers/users.js index b2b9c32233..abff42a4de 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -157,6 +157,7 @@ usersController.getMap = function(req, res, next) { } data.room = validator.escape(categoryData.name); data.link = '/category/' + categoryData.slug; + data.core = false; next(null, data); }); } else if (roomName.startsWith('topic_')) { @@ -167,13 +168,18 @@ usersController.getMap = function(req, res, next) { } data.room = validator.escape(topicData.title); data.link = '/topic/' + topicData.slug; + data.core = false; next(null, data); }); } else { + data.core = true; next(null, data); } }); }, function(err, data) { + if (err) { + return next(err); + } data.sort(function(a, b) { return b.total - a.total; });