From 7f2174dd2cbe72ca8dd07ca0c922be588bf0e826 Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Fri, 3 Feb 2023 16:48:18 +0500 Subject: [PATCH] chore: quick fix --- api/src/controllers/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/controllers/auth.ts b/api/src/controllers/auth.ts index 360ebaa..6c56e89 100644 --- a/api/src/controllers/auth.ts +++ b/api/src/controllers/auth.ts @@ -159,7 +159,7 @@ const updatePassword = async ( ) => { const { currentPassword, newPassword } = data const userId = req.user?.userId - const dbUser = await User.findOne({ userId }) + const dbUser = await User.findOne({ id: userId }) if (!dbUser) throw {