убрал всё обратно

This commit is contained in:
Mike0001-droid 2024-06-10 16:41:19 +05:00
parent 3486aa481f
commit 006a800e72
1 changed files with 1 additions and 2 deletions

View File

@ -8,7 +8,6 @@ from django.shortcuts import get_object_or_404, get_list_or_404
from rest_framework.permissions import IsAuthenticated
from decouple import config
from urllib.parse import urljoin
from django.http import HttpRequest
import requests
from .schemas import SongSchema, DeleteSongSchema
@ -24,7 +23,7 @@ class SongViewSet(GenericViewSet):
songs_pk = FavoriteSong.objects.filter(user=request.user, song__isnull=False).values_list('song_id', flat=True)
queryset = Song.objects.filter(id__in=songs_pk)
serializer = SongSerializer(queryset, many=True)
return Response(f"{HttpRequest.build_absolute_uri()}")
return Response(serializer.data)
def retrieve(self, request, pk=None):
try: