|
|
|
@ -33,8 +33,12 @@ var Controllers = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Controllers.home = function(req, res, next) {
|
|
|
|
|
var route = meta.config.homePageRoute || meta.config.homePageCustom || 'categories',
|
|
|
|
|
hook = 'action:homepage.get:' + route;
|
|
|
|
|
var route = meta.config.homePageRoute || meta.config.homePageCustom || 'categories';
|
|
|
|
|
|
|
|
|
|
user.getSettings(req.uid, function(err, settings) {
|
|
|
|
|
if (!err) route = settings.homePageRoute || route;
|
|
|
|
|
|
|
|
|
|
var hook = 'action:homepage.get:' + route;
|
|
|
|
|
|
|
|
|
|
if (plugins.hasListeners(hook)) {
|
|
|
|
|
plugins.fireHook(hook, {req: req, res: res, next: next});
|
|
|
|
@ -49,6 +53,7 @@ Controllers.home = function(req, res, next) {
|
|
|
|
|
res.redirect(route);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Controllers.reset = function(req, res, next) {
|
|
|
|
|