Skip to content

Commit

Permalink
Add serializer_class to LoginView
Browse files Browse the repository at this point in the history
This allows spectacular to properly generate the docs for the endpoint
  • Loading branch information
nas-tabchiche committed Apr 18, 2024
1 parent 3808ce4 commit 519dec9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/iam/knox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
from rest_framework import permissions
from rest_framework.authtoken.serializers import AuthTokenSerializer
from knox.views import LoginView as KnoxLoginView
from iam.serializers import LoginSerializer


class LoginView(KnoxLoginView):
permission_classes = (permissions.AllowAny,)
serializer_class = LoginSerializer

def post(self, request, format=None):
serializer = AuthTokenSerializer(data=request.data)
Expand Down

0 comments on commit 519dec9

Please sign in to comment.