This commit is contained in:
Trey t
2023-06-25 10:59:11 -05:00
parent 26df876a7f
commit cbc589aafe
6 changed files with 16 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
from .models import RegisteredUser, RegisteredUserBlockUser
from .models import RegisteredUser
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework import status
@@ -6,7 +6,6 @@ from .serializers import RegisteredUserSerializer, CreateRegisteredUserThroughUs
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from django.contrib.auth import authenticate
from push_notifications.models import APNSDevice
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.decorators import authentication_classes
@@ -50,7 +49,7 @@ def create_registered_user(request):
def login_registered_user(request):
email = request.data["email"]
password = request.data["password"]
user = authenticate(username=email, password=password)
if user is not None: