Skip to content

Commit

Permalink
move spa serializers to spa dir
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Dec 4, 2024
1 parent b4dfca1 commit 0704d0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/argus/auth/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from rest_framework import serializers
from rest_framework.reverse import reverse


from .models import User


Expand Down Expand Up @@ -47,9 +46,5 @@ class Meta:
read_only_fields = ["pk", "username"]


class RefreshTokenSerializer(serializers.Serializer):
token = serializers.CharField(label=("Token"), read_only=True)


class EmptySerializer(serializers.Serializer):
pass
5 changes: 5 additions & 0 deletions src/argus/auth/spa/serializers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from rest_framework import serializers


class RefreshTokenSerializer(serializers.Serializer):
token = serializers.CharField(label=("Token"), read_only=True)
6 changes: 2 additions & 4 deletions src/argus/auth/spa/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
from rest_framework.response import Response
from rest_framework.views import APIView

from .serializers import (
EmptySerializer,
RefreshTokenSerializer,
)
from ..serializers import EmptySerializer
from .serializers import RefreshTokenSerializer


class ObtainNewAuthToken(ObtainAuthToken):
Expand Down

0 comments on commit 0704d0b

Please sign in to comment.