Skip to content

Node.js based forum software built for the modern web

hinting

psychobunnyde5a56478074
diff --git a/src/routes/index.js b/src/routes/index.js
index 805428f639..ca0416fd30 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -157,11 +157,12 @@ function groupRoutes(app, middleware, controllers) {
module.exports = function(app, middleware) {
plugins.ready(function() {
- var router = express.Router();
+ var router = express.Router(),
+ relativePath = nconf.get('relative_path');
+
router.render = function() {
app.render.call(arguments);
- }
- var relativePath = nconf.get('relative_path');
+ };
app.all(relativePath + '/api/*', middleware.updateLastOnlineTime, middleware.prepareAPI);
app.all(relativePath + '/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI);