Files
muzak/backend/playlist/views/api/profile.py
T

13 lines
477 B
Python

from pickle import BUILD
from playlist import serializers
from rest_framework.views import APIView
from rest_framework.response import Response
from playlist.serializers import ProfileSerializer, ProfileUpdateSerializer, BackgroundSerializer
from playlist.models import Profile, Background
class ProfileMeView(APIView):
def get(self, request):
profile = request.user.profile
serializer = ProfileSerializer(profile)
return Response(serializer.data)