Skip to content

Node.js based forum software built for the modern web

missing nconf require

barisusaklic458a7f7b224
diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js
index f92e5b3d1b..7df83e5829 100644
--- a/src/controllers/helpers.js
+++ b/src/controllers/helpers.js
@@ -1,5 +1,6 @@
'use strict';
+var nconf = require('nconf');
var helpers = {};
diff --git a/src/controllers/index.js b/src/controllers/index.js
index ec9919371d..0c2f3db763 100644
--- a/src/controllers/index.js
+++ b/src/controllers/index.js
@@ -234,8 +234,7 @@ Controllers.outgoing = function(req, res, next) {
if (url) {
res.render('outgoing', data);
} else {
- res.status(404);
- res.redirect(nconf.get('relative_path') + '/404');
+ res.status(404).redirect(nconf.get('relative_path') + '/404');
}
};
diff --git a/src/controllers/tags.js b/src/controllers/tags.js
index 53b418f6b9..c9ad239931 100644
--- a/src/controllers/tags.js
+++ b/src/controllers/tags.js
@@ -18,7 +18,7 @@ tagsController.getTag = function(req, res, next) {
if (Array.isArray(tids) && !tids.length) {
topics.deleteTag(tag);
- return res.render('tag', {topics: [], tag:tag});
+ return res.render('tag', {topics: [], tag: tag});
}
topics.getTopics('tag:' + tag + ':topics', uid, tids, function(err, data) {
@@ -28,7 +28,7 @@ tagsController.getTag = function(req, res, next) {
res.locals.metaTags = [
{
- name: "title",
+ name: 'title',
content: tag
},
{
@@ -36,7 +36,7 @@ tagsController.getTag = function(req, res, next) {
content: tag
},
{
- property: "og:url",
+ property: 'og:url',
content: nconf.get('url') + '/tags/' + tag
}
];