Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions api/controllers/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@ module.exports = {

success: function (){

// Store user id in the user session
req.session.me = user.id;
// Update lastLoggedIn
user.lastLoggedIn = new Date();
user.save(function(err, user) {
if (err) return next(err);

// All done- let the client know that everything worked.
return res.ok();
// Store user id in the user session
req.session.me = user.id;

// All done- let the client know that everything worked.
return res.ok();
});
}
});
});
Expand Down