got rid of extra call to user.getSettings

This commit is contained in:
barisusakli
2015-10-23 14:07:09 -04:00
parent 0e057a3d92
commit 751a6c6839
2 changed files with 4 additions and 9 deletions

View File

@@ -84,6 +84,7 @@ apiController.getConfig = function(req, res, next) {
config.categoryTopicSort = meta.config.categoryTopicSort || 'newest_to_oldest';
config.csrf_token = req.csrfToken();
config.searchEnabled = plugins.hasListeners('filter:search.query');
config.bootswatchSkin = 'default';
if (!req.user) {
return filterConfig();
@@ -103,6 +104,7 @@ apiController.getConfig = function(req, res, next) {
config.topicPostSort = settings.topicPostSort || config.topicPostSort;
config.categoryTopicSort = settings.categoryTopicSort || config.categoryTopicSort;
config.topicSearchEnabled = settings.topicSearchEnabled || false;
config.bootswatchSkin = settings.bootswatchSkin || config.bootswatchSkin;
filterConfig();
});