Added API Route for User Password Change#797
Merged
Merged
Conversation
Marmik2003
suggested changes
May 28, 2022
Co-authored-by: Marmik Patel <44599895+Marmik2003@users.noreply.github.com>
vigneshhari
requested changes
Jun 6, 2022
vigneshhari
requested changes
Jun 10, 2022
sainak
reviewed
Jul 3, 2022
sainak
requested changes
Jul 3, 2022
Comment on lines
+37
to
+41
| 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() |
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.
|
vigneshhari
requested changes
Jul 3, 2022
vigneshhari
approved these changes
Jul 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API route is /api/v1/password_change/
Need to update documentation and frontend.