WIP
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user