feat(API): change to jwt authentication.

This commit is contained in:
2026-02-14 15:12:32 -05:00
parent 4812160ea2
commit 7a9034943a
18 changed files with 130 additions and 82 deletions

View File

@@ -0,0 +1,12 @@
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated
from .serializers import UserSerializer
class CurrentUserView(APIView):
permission_classes = [IsAuthenticated]
def get(self, request):
serializer = UserSerializer(request.user)
return Response(serializer.data)