зеркало из https://github.com/mozilla/CSOL-site.git
Moving to somewhere a bit more sensible
This commit is contained in:
Родитель
18a4735479
Коммит
c7b8bf18bf
|
@ -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();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче