Skip to content

Commit

Permalink
use req.app.render
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 7, 2016
1 parent 102beb5 commit 0614957
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/controllers/sitemap.js
Expand Up @@ -9,8 +9,8 @@ sitemapController.render = function(req, res, next) {
if (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) {
return next(err);
}
Expand Down
3 changes: 0 additions & 3 deletions src/routes/index.js
Expand Up @@ -103,9 +103,6 @@ module.exports = function(app, middleware, hotswapIds) {
pluginRouter.render = function() {
app.render.apply(app, arguments);
};
controllers.render = function() {
app.render.apply(app, arguments);
};

// Set-up for hotswapping (when NodeBB reloads)
pluginRouter.hotswapId = 'plugins';
Expand Down

0 comments on commit 0614957

Please sign in to comment.