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 {