From 34546e49cfe0c140b7154deb9e558ba1ca59e32f Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Sun, 13 Oct 2024 09:46:59 +0200 Subject: [PATCH] Apply read filtering --- src/newsreader/news/core/endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newsreader/news/core/endpoints.py b/src/newsreader/news/core/endpoints.py index 6f70ae2..ed778b4 100644 --- a/src/newsreader/news/core/endpoints.py +++ b/src/newsreader/news/core/endpoints.py @@ -20,7 +20,7 @@ from newsreader.news.core.serializers import CategorySerializer, PostSerializer class ListPostView(ListAPIView): - queryset = Post.objects.all() + queryset = Post.objects.filter(read=False) serializer_class = PostSerializer permission_classes = (IsAuthenticated, IsPostOwner) pagination_class = CursorPagination