Skip to content

Added API Route for User Password Change#797

Merged
vigneshhari merged 18 commits into
ohcnetwork:masterfrom
siddnikh:issue#779
Jul 7, 2022
Merged

Added API Route for User Password Change#797
vigneshhari merged 18 commits into
ohcnetwork:masterfrom
siddnikh:issue#779

Conversation

@siddnikh
Copy link
Copy Markdown
Contributor

The API route is /api/v1/password_change/
Need to update documentation and frontend.

Comment thread config/settings/local.py Outdated
Co-authored-by: Marmik Patel <44599895+Marmik2003@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@Marmik2003 Marmik2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread care/users/api/viewsets/change_password.py Outdated
Comment thread care/facility/migrations/0293_auto_20220526_2249.py
Comment thread config/settings/local.py Outdated
Comment thread care/users/api/viewsets/change_password.py
Comment thread care/users/api/viewsets/change_password.py Outdated
Comment thread care/users/api/viewsets/change_password.py Outdated
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()
Copy link
Copy Markdown
Member

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

Comment thread care/users/api/viewsets/change_password.py Outdated
siddnikh and others added 3 commits July 3, 2022 20:21
Co-authored-by: Aakash Singh <46787056+sainAk@users.noreply.github.com>
Co-authored-by: Aakash Singh <46787056+sainAk@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 3, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@84af660). Click here to learn what that means.
The diff coverage is n/a.

@@            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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84af660...74f6683. Read the comment docs.

Comment thread care/users/api/viewsets/change_password.py Outdated
Comment thread care/users/api/viewsets/change_password.py Outdated
@vigneshhari vigneshhari merged commit ce093ea into ohcnetwork:master Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants