-
Notifications
You must be signed in to change notification settings - Fork 405
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
Added API Route for User Password Change #797
Conversation
Co-authored-by: Marmik Patel <44599895+Marmik2003@users.noreply.github.com>
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
if not self.object.check_password(serializer.data.get("old_password")): | ||
return Response({"old_password": ["Wrong password entered. Please check your password."]}, status=status.HTTP_400_BAD_REQUEST) | ||
# set_password also hashes the password that the user will get | ||
self.object.set_password(serializer.data.get("new_password")) | ||
self.object.save() |
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.
should be handled in serializer
Co-authored-by: Aakash Singh <46787056+sainAk@users.noreply.github.com>
Co-authored-by: Aakash Singh <46787056+sainAk@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #797 +/- ##
=========================================
Coverage ? 52.75%
=========================================
Files ? 180
Lines ? 8777
Branches ? 0
=========================================
Hits ? 4630
Misses ? 4147
Partials ? 0 Continue to review full report at Codecov.
|
The API route is /api/v1/password_change/
Need to update documentation and frontend.