Remove unused variable. TODO: userModel.getOne() with selected fields in arg
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 22 May 2020 19:25:20 +0000 (21:25 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 22 May 2020 19:25:20 +0000 (21:25 +0200)
server/utils/access.js

index 6b8eac8..66ff952 100644 (file)
@@ -17,7 +17,6 @@ module.exports =
       UserModel.getOne("sessionToken", req.cookies.token, (err, user) => {
         if (!!user) {
           req.userId = user.id;
-          req.userName = user.name;
           loggedIn = true;
         } else {
           // Token in cookies presumably wrong: erase it