From 5ad9d41ecaf3365784017beb588be333ed13a1bd Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Sat, 30 Sep 2017 11:31:29 +0200 Subject: [PATCH] I pushed :poop: --- index.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 26e0ebc..b094436 100644 --- a/index.js +++ b/index.js @@ -40,15 +40,9 @@ function startServer() { log.request(req, res, Date.now() - start); }); res.locals.session = req.session; - // if (req.session.user !== undefined) { - // req.session.user = User.fromJSON(req.session.user); - // } - req.session.user = { - username: "thomas", - _username: { - value: "thomas", - }, - }; + if (req.session.user !== undefined) { + req.session.user = User.fromJSON(req.session.user); + } next(); });