Moving to somewhere a bit more sensible

This commit is contained in:
Andrew Hayward 2013-04-18 15:36:50 +01:00
Родитель 18a4735479
Коммит c7b8bf18bf
1 изменённых файлов: 59 добавлений и 59 удалений

Просмотреть файл

@ -4,8 +4,6 @@ const learners = db.model('Learner');
const guardians = db.model('Guardian'); const guardians = db.model('Guardian');
const signupTokens = db.model('SignupToken'); const signupTokens = db.model('SignupToken');
module.exports = function (app) {
var validateEmail = function (email) { var validateEmail = function (email) {
// TODO - make sure email is valid // TODO - make sure email is valid
return true; return true;
@ -65,6 +63,8 @@ module.exports = function (app) {
return res.redirect(req.session.user.home, status || 303); return res.redirect(req.session.user.home, status || 303);
} }
module.exports = function (app) {
app.use(function(req, res, next) { app.use(function(req, res, next) {
res.locals.user = req.session.user; res.locals.user = req.session.user;
next(); next();