Вот моя функция:
exports.dashboard = function(req, res ,next) {
console.log(req.session);
var userForCheck = req.session.user_name;
console.log(user);
}
на экране моей консоли выводится следующее требование:
Sess {
cookie:
{ path: '/',
_expires: 2018-11-16T03:18:31.896Z,
originalMaxAge: 59999,
httpOnly: true }
user: { user_name: 'given001', password: '123' } }
, но пользовательская переменная
undefinded
как я могу сохранить user_name в переменной userForCheck без неопределенности?