Skip to content

Commit

Permalink
Merge pull request #1578 from gtech-mulearn/dev
Browse files Browse the repository at this point in the history
fix change password
  • Loading branch information
adnankattekaden authored Nov 19, 2023
2 parents 2eab05e + b508504 commit cfed414
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions api/dashboard/profile/profile_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,14 +490,12 @@ def post(self, request):
general_message="No user data available"
).get_failure_response()

self.save_password(request, user)
return self.save_password(request, user)

def save_password(self, request, user_obj):
new_password = request.data.get("password")
hashed_pwd = make_password(new_password)

user_obj.password = hashed_pwd
user_obj.save()
return CustomResponse(
general_message="New Password Saved Successfully"
).get_success_response()
return CustomResponse(general_message="New Password Saved Successfully").get_success_response()

0 comments on commit cfed414

Please sign in to comment.