Skip to content

Conversation

Rohit3523
Copy link
Collaborator

@Rohit3523 Rohit3523 commented Sep 27, 2025

Proposed changes

When we click Reset Password and enter email id, instead of calling reset password endpoint, it calls send 2fa code api

Introduced in #6675

Issue(s)

How to test or reproduce

  1. Launch app
  2. click on reset password
  3. enter email
  4. click on submit
  5. check mail

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Refactor
    • Updated the Forgot Password flow to use a new backend method for sending reset emails.
    • Maintains existing behavior: submits the email, shows the same success alert, and navigates back on success.
    • Error handling remains unchanged; users should experience no visible differences.

Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

Walkthrough

Replaced the forgot password REST API function used by ForgotPasswordView: updated import from sendEmailCode to forgotPassword and changed the invocation accordingly. Success and error handling, including navigation and alert behavior, remain unchanged.

Changes

Cohort / File(s) Summary of Changes
Forgot password API switch
app/views/ForgotPasswordView.tsx
Import updated to forgotPassword from ../lib/services/restApi; call site changed from sendEmailCode(email) to forgotPassword(email). No other logic changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant V as ForgotPasswordView
  participant API as restApi.forgotPassword

  U->>V: Submit email for reset
  V->>API: forgotPassword(email)
  alt Success
    API-->>V: 200 OK
    V->>V: Show alert, navigate back
  else Error
    API-->>V: Error
    V->>V: Show error alert
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • diegolmello
  • OtavioStasiak

Poem

I thump my paws—new paths align,
A swap of calls, clean and fine.
Forgot the code? No need to brood—
A fresher route delivers the mood.
Hop back home with alerts that chime,
APIs switched, right on time. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “fix: forget password api” directly reflects the key change of updating the ForgotPasswordView to use the correct password‐reset API handler, aligning with the main modification in the code. It is concise and focused on the primary fix implemented in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch forget-password-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@diegolmello diegolmello merged commit 2362f3d into develop Sep 29, 2025
6 of 16 checks passed
@diegolmello diegolmello deleted the forget-password-fix branch September 29, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants