# Path: server/core/serializers/user.py
# class LoggedUserSerializer(BaseUserSerializer):
#     pass


from django.shortcuts import render
from rest_framework import views
from ..serializers import LoggedUserSerializer



class IndexView(views.APIView):
    def get(self, request):
        if request.user.is_authenticated():
            user = LoggedUserSerializer(request.user, context={'request': request}).data
        else:

# Path: server/core/serializers/user.py
# class LoggedUserSerializer(BaseUserSerializer):
#     pass


# Path: server/core/views/index.py
from django.shortcuts import render
from rest_framework import views
from ..serializers import LoggedUserSerializer




class IndexView(views.APIView):
    def get(self, request):
        if request.user.is_authenticated():
            user = LoggedUserSerializer(request.user, context={'request': request}).data
        else:

            user = None