Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxIsJoe committed Jan 17, 2024
1 parent c06af96 commit 833e69e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/accounts/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def post(self, request, reset_token):
account.set_password(serializer.validated_data["password"])
account.save()
reset_request.delete()
return Response(data={"Operation Done": "Changed password succesfully"}, status=status.HTTP_200_OK)
except (TypeError, ValueError, OverflowError, User.DoesNotExist):
return Response({'detail': 'Invalid link or expired.'}, status=status.HTTP_400_BAD_REQUEST)

Expand Down

0 comments on commit 833e69e

Please sign in to comment.