From ddd7152683b3aff3de0d3baed73d85c10875cff6 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 22 May 2024 11:42:29 -0700 Subject: [PATCH] Removed old comments --- Server/controllers/authController.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Server/controllers/authController.js b/Server/controllers/authController.js index 07306d1cf..2d4fe310d 100644 --- a/Server/controllers/authController.js +++ b/Server/controllers/authController.js @@ -90,9 +90,7 @@ const loginController = async (req, res) => { throw new Error("Password does not match!"); } - // Copy user to remove password. More memory, but better than mutating user? - // We can move this to the DB layer if we want - // Probably not neccessary at all as we'll likely return a JWT instead of a user + // Remove password from user object. Should this be abstracted to DB layer? const userWithoutPassword = { ...user._doc }; delete userWithoutPassword.password;