From 9a16c83725c2650c224f967fd0c1826ca7fb436f Mon Sep 17 00:00:00 2001 From: Mehdi Aarab Date: Wed, 12 Oct 2022 02:36:49 +0200 Subject: [PATCH] Update auth.js we don't need to get password from user._doc --- api/controllers/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/controllers/auth.js b/api/controllers/auth.js index f3699badd1..4812f022f3 100644 --- a/api/controllers/auth.js +++ b/api/controllers/auth.js @@ -36,7 +36,7 @@ export const login = async (req, res, next) => { process.env.JWT ); - const { password, isAdmin, ...otherDetails } = user._doc; + const { isAdmin, ...otherDetails } = user._doc; res .cookie("access_token", token, { httpOnly: true,