v1.18.x
barisusakli 10 years ago
parent 95e3c6f8a4
commit a1624013f8

@ -237,4 +237,11 @@ Controllers.outgoing = function(req, res, next) {
} }
}; };
Controllers.termsOfUse = function(req, res, next) {
if (!meta.config.termsOfUse) {
return categoriesController.notFound(req, res);
}
res.render('tos', {termsOfUse: meta.config.termsOfUse});
};
module.exports = Controllers; module.exports = Controllers;

@ -3,9 +3,9 @@
var nconf = require('nconf'), var nconf = require('nconf'),
path = require('path'), path = require('path'),
winston = require('winston'), winston = require('winston'),
controllers = require('./../controllers'), controllers = require('../controllers'),
meta = require('./../meta'), meta = require('../meta'),
plugins = require('./../plugins'), plugins = require('../plugins'),
express = require('express'), express = require('express'),
metaRoutes = require('./meta'), metaRoutes = require('./meta'),
@ -28,6 +28,7 @@ function mainRoutes(app, middleware, controllers) {
setupPageRoute(app, '/outgoing', middleware, [], controllers.outgoing); setupPageRoute(app, '/outgoing', middleware, [], controllers.outgoing);
setupPageRoute(app, '/search/:term?', middleware, [middleware.guestSearchingAllowed], controllers.search); setupPageRoute(app, '/search/:term?', middleware, [middleware.guestSearchingAllowed], controllers.search);
setupPageRoute(app, '/reset/:code?', middleware, [], controllers.reset); setupPageRoute(app, '/reset/:code?', middleware, [], controllers.reset);
setupPageRoute(app, '/tos', middleware, [], controllers.termsOfUse);
} }
function staticRoutes(app, middleware, controllers) { function staticRoutes(app, middleware, controllers) {

Loading…
Cancel
Save