Removed old comments

This commit is contained in:
Alex Holliday committed 2024-05-22 11:42:29 -07:00
1 parent 073f8b2e30
commit ddd7152683
1 file changed
+1 -3
+1 -3
View File
@@ -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;