Skip to content

Node.js based forum software built for the modern web

added core field

barisusakli7a8cdfc09557
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;
});