Skip to content

Commit

Permalink
Finished
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksa-32 committed Jan 5, 2025
1 parent bd4bf2a commit 75e4d14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cinema/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def post(self, request):
class GenreDetail(APIView):

def get_object(self, pk):
return get_object_or_404(Movie, pk=pk)
return get_object_or_404(Genre, pk=pk)

def get(self, request, pk):
genre = self.get_object(pk)
serializer = MovieSerializer(genre)
serializer = GenreSerializer(genre)
return Response(serializer.data, status=status.HTTP_200_OK)

def put(self, request, pk):
Expand Down

0 comments on commit 75e4d14

Please sign in to comment.