-
-
Notifications
You must be signed in to change notification settings - Fork 8k
♻️ Simplify reset password logic by removing duplicate code #1440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️ Simplify reset password logic by removing duplicate code #1440
Conversation
YuriiMotov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Hi @alejsdev @YuriiMotov, I don’t see a merge button for this PR. Could you let me know how I can merge it into |
tiangolo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks! 🚀 🍰
Description
This pull request refactors the
reset_passwordAPI endpoint to delegate password hashing and database update logic to the existingcrud.update_usermethod.The original implementation in
reset_passwordcontained redundant code that is already handled incrud.py, resulting in unnecessary duplication.This refactor aims to keep the password update process and database queries in one place (
crud.py), making it easier to manage and update if needed.