diff --git a/apps/accounts/api/views.py b/apps/accounts/api/views.py index c75df1c..5d9db83 100644 --- a/apps/accounts/api/views.py +++ b/apps/accounts/api/views.py @@ -1,6 +1,6 @@ from django.contrib.auth import get_user_model from rest_framework.response import Response -from rest_framework.status import HTTP_200_OK, HTTP_400_BAD_REQUEST +from rest_framework.status import HTTP_201_CREATED, HTTP_400_BAD_REQUEST from rest_framework.views import APIView from rest_framework.permissions import AllowAny from .serializers import UserLoginSerializer @@ -17,6 +17,6 @@ class UserLoginAPIView(APIView): serializer = UserLoginSerializer(data=data) if serializer.is_valid(raise_exception=True): login_data = serializer.data - return Response(login_data, HTTP_200_OK) + return Response(login_data, HTTP_201_CREATED) else: return Response(serializer.errors, HTTP_400_BAD_REQUEST)