Commit b60b2c84 authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

routes merge artifacts cleansed

parent d3d90b15
Pipeline #372 passed with stage
in 9 seconds
......@@ -149,7 +149,7 @@ module.exports = function (app, config, passport) {
});
}
return res.redirect(uri);
return res.redirect('/');
});
});
......@@ -449,9 +449,27 @@ module.exports = function (app, config, passport) {
res.redirect('/account/login')
});
app.get('/logout', function (req, res) {
if (req.user == null) {
return res.redirect('/account/');
// todo: user registration with captcha
app.get('/registration', function(req, res) {
res.render('registration')
})
app.post('/registration', function(req, res) {
// TODO:
// create gitlab account?
// send email to activate profile?
// user data
var curDate = new Date()
var userData = {
title: req.body.inputTitle,
firstname: req.body.inputFirstname,
lastname: req.body.inputLastname,
email: req.body.inputEmail,
organisation: req.body.inputOrganisation,
industry: req.body.inputIndustry,
speciality: req.body.inputSpeciality,
createdDate: curDate.toISOString().slice(0,10)
}
// encrypt password
bcrypt.genSalt(saltRounds, function(err, salt) {
......@@ -468,12 +486,16 @@ module.exports = function (app, config, passport) {
else {
req.flash('success', 'Your account has been created. Please log in.');
}
res.redirect('/account/registration');
res.redirect('/registration');
})
});
});
})
app.get('/email/:email', function(req, res) {
methods.checkUserEmail(req.params.email, function(err, user){
if (!err) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment