diff --git a/backend/api/authentication/serializers.py b/backend/api/authentication/serializers.py new file mode 100644 index 0000000..48a4620 --- /dev/null +++ b/backend/api/authentication/serializers.py @@ -0,0 +1,5 @@ +from rest_framework import serializers + + +class LogoutSerializer(serializers.Serializer): + refresh = serializers.CharField() diff --git a/backend/api/authentication/views.py b/backend/api/authentication/views.py index 10fbcd5..a9faa32 100644 --- a/backend/api/authentication/views.py +++ b/backend/api/authentication/views.py @@ -3,10 +3,13 @@ from rest_framework.views import APIView from rest_framework.permissions import IsAuthenticated from rest_framework_simplejwt.tokens import RefreshToken +from api.authentication.serializers import LogoutSerializer + # Logout View class LogoutView(APIView): permission_classes = [IsAuthenticated] + serializer_class = LogoutSerializer def post(self, request): try: