12 lines
322 B
JavaScript
12 lines
322 B
JavaScript
|
/* POST eskaera */
|
||
|
|
||
|
exports.login = function(req, res){
|
||
|
//console.log(req.body);
|
||
|
var logged;
|
||
|
if(req.body.username != ''){
|
||
|
res.cookie('username', req.body.username, { expires: new Date(Date.now() + 900000), 'sameSite':'lax'});
|
||
|
logged = true;
|
||
|
}
|
||
|
res.render('index',{logged: logged, username: req.body.username});
|
||
|
};
|