X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/540e76dd8e04d7bab431da696565e826788bd218..2c101e78aee8cd3ccf3f24a0ecaa22fa77593c5c:/src/social/api/views.py diff --git a/src/social/api/views.py b/src/social/api/views.py index 555fd8433..c5506ce79 100644 --- a/src/social/api/views.py +++ b/src/social/api/views.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # from django.http import Http404 from rest_framework.generics import ListAPIView, get_object_or_404 @@ -8,12 +7,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 +32,7 @@ class LikeView(APIView): return Response({}) +@vary_on_auth class ShelfView(ListAPIView): permission_classes = [IsAuthenticated] serializer_class = BookSerializer