Skip to content

Commit

Permalink
Fix forget Password
Browse files Browse the repository at this point in the history
  • Loading branch information
Somnath-Chattaraj committed Oct 10, 2024
1 parent fe7413a commit 9e21fca
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 219 deletions.
2 changes: 1 addition & 1 deletion backend/src/controllers/otpController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const verifyOtp = asyncHandler(async (req: any, res: any) => {
});

if (otpData === null) {
return res.status(400).json({ message: "Invalid OTP" });
return res.status(404).json({ message: "Invalid OTP" });
}

res.status(200).json({ message: "OTP verified successfully" });
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/otpRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import { changePassword, otpGenerator, verifyOtp } from "../controllers/otpContr
const Otprouter = express.Router();

Otprouter.post('/' ,otpGenerator);
Otprouter.get('/verify',verifyOtp);
Otprouter.post('/verify',verifyOtp);
Otprouter.post('/change', changePassword);
export default Otprouter;
Loading

0 comments on commit 9e21fca

Please sign in to comment.