summaryrefslogtreecommitdiffstats
path: root/auth_api
diff options
context:
space:
mode:
Diffstat (limited to 'auth_api')
-rw-r--r--auth_api/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth_api/views.py b/auth_api/views.py
index efd98b9..cd32914 100644
--- a/auth_api/views.py
+++ b/auth_api/views.py
@@ -3,7 +3,7 @@ from django.contrib.auth.models import User
3from django.http.response import Http404 3from django.http.response import Http404
4from django.shortcuts import get_object_or_404 4from django.shortcuts import get_object_or_404
5 5
6from rest_framework import permissions, serializers 6from rest_framework import permissions
7from rest_framework.authtoken.serializers import AuthTokenSerializer 7from rest_framework.authtoken.serializers import AuthTokenSerializer
8from rest_framework.response import Response 8from rest_framework.response import Response
9from rest_framework.views import APIView 9from rest_framework.views import APIView
@@ -16,7 +16,7 @@ from .serializers import UserSerializer, RegisterUserSerializer
16class LoginView(KnoxLoginView): 16class LoginView(KnoxLoginView):
17 permission_classes = (permissions.AllowAny, ) 17 permission_classes = (permissions.AllowAny, )
18 18
19 def post(self, request, format=None): 19 def post(self, request):
20 token_serializer = AuthTokenSerializer(data=request.data) 20 token_serializer = AuthTokenSerializer(data=request.data)
21 token_serializer.is_valid(raise_exception=True) 21 token_serializer.is_valid(raise_exception=True)
22 user = token_serializer.validated_data['user'] 22 user = token_serializer.validated_data['user']