use req.app.render

v1.18.x
barisusakli
parent 102beb5f93
commit 0614957542

@ -9,8 +9,8 @@ sitemapController.render = function(req, res, next) {
if (err) { if (err) {
return next(err); return next(err);
} }
var Controllers = require('./index');
Controllers.render('sitemap', tplData, function(err, xml) { req.app.render('sitemap', tplData, function(err, xml) {
if (err) { if (err) {
return next(err); return next(err);
} }

@ -103,9 +103,6 @@ module.exports = function(app, middleware, hotswapIds) {
pluginRouter.render = function() { pluginRouter.render = function() {
app.render.apply(app, arguments); app.render.apply(app, arguments);
}; };
controllers.render = function() {
app.render.apply(app, arguments);
};
// Set-up for hotswapping (when NodeBB reloads) // Set-up for hotswapping (when NodeBB reloads)
pluginRouter.hotswapId = 'plugins'; pluginRouter.hotswapId = 'plugins';

Loading…
Cancel
Save