feature/fix_generate_pass
Andrey 8 years ago
parent ae80115d0e
commit 019057ddab
  1. 4
      access/views.py

@ -110,7 +110,7 @@ class RegistrationView(APIView):
@staticmethod
def post(request):
try:
get_user_model().objects.get(email=request.JSON['email'].lower())
user = get_user_model().objects.get(email=request.JSON['email'].lower())
return Response('user already exist', status=403)
except get_user_model().DoesNotExist:
password = request.JSON.get('password')
@ -145,7 +145,7 @@ class LoginView(APIView):
@staticmethod
def post(request):
password = request.JSON.get('password')
email = request.JSON.get('email')
email = request.JSON.get('email').lower()
if not request.user.is_authenticated():
if not password == "skillbox":
user = auth.authenticate(email=email, password=request.JSON.get('password'))

Loading…
Cancel
Save