mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-17 02:45:08 +00:00
reset password msg
This commit is contained in:
@ -72,6 +72,8 @@ class ResetPasswordSerializer(serializers.Serializer):
|
||||
if user_opt_details:
|
||||
user_details = User.objects.filter(email=user_opt_details.email).last()
|
||||
if user_details:
|
||||
if user_details.check_password(password):
|
||||
raise serializers.ValidationError({"details":ERROR_CODE['2001'],"code":"400", "status":"failed"})
|
||||
user_details.set_password(password)
|
||||
user_details.save()
|
||||
return {'password':password}
|
||||
|
Reference in New Issue
Block a user