summaryrefslogtreecommitdiffstats
path: root/auth_api
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2021-11-26 18:44:38 +0100
committerjdlugosz963 <jdlugosz963@gmail.com>2021-11-26 18:44:38 +0100
commiteaf89ff64ce5c4e39239aec50a973d1c58a40bee (patch)
tree161c53033c08f9f0bb499dd3c1f394a0f508cf4e /auth_api
parent45daed0c4fd60febf9458c889f7a89c0e5ab70bd (diff)
downloadlom_api-eaf89ff64ce5c4e39239aec50a973d1c58a40bee.tar.gz
lom_api-eaf89ff64ce5c4e39239aec50a973d1c58a40bee.zip
add groups views
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']