X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b0b9c1f0f9f4cc0f5c4d00d913735ab6a81bf214..b74fa4eb15c62d11fe0fa2b1015571c90681dd86:/src/social/api/views.py diff --git a/src/social/api/views.py b/src/social/api/views.py index 555fd8433..1be521044 100644 --- a/src/social/api/views.py +++ b/src/social/api/views.py @@ -8,12 +8,14 @@ from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from api.models import BookUserData +from api.utils import vary_on_auth from catalogue.api.helpers import order_books, books_after from catalogue.api.serializers import BookSerializer from catalogue.models import Book from social.utils import likes +@vary_on_auth class LikeView(APIView): permission_classes = [IsAuthenticated] @@ -31,6 +33,7 @@ class LikeView(APIView): return Response({}) +@vary_on_auth class ShelfView(ListAPIView): permission_classes = [IsAuthenticated] serializer_class = BookSerializer