Skip to content

Commit 1fdba3f

Browse files
committed
fix: handle null user properly in forget password function
1 parent 39a116b commit 1fdba3f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: backend/.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#DATABASE = "mongodb://localhost:27017"
1+
DATABASE ="mongodb+srv://ronakkriplani9:[email protected]/"
22
#RESEND_API = "your resend_api"
33
#OPENAI_API_KEY = "your open_ai api key"
44
JWT_SECRET= "your_private_jwt_secret_key"

Diff for: backend/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: backend/src/controllers/middlewaresControllers/createAuthMiddleware/forgetPassword.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const forgetPassword = async (req, res, { userModel }) => {
3333
}
3434

3535
const user = await User.findOne({ email: email, removed: false });
36-
const databasePassword = await UserPassword.findOne({ user: user._id, removed: false });
36+
3737

3838
// console.log(user);
3939
if (!user)

0 commit comments

Comments
 (0)