1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 06:19:38 +02:00

search ui fixes

This commit is contained in:
Sean Morley 2024-07-22 10:08:42 -04:00
parent fc782d9354
commit e093be31af
3 changed files with 32 additions and 7 deletions

View file

@ -157,8 +157,8 @@ class AdventureViewSet(viewsets.ModelViewSet):
(Q(user_id=request.user.id) | Q(is_public=True))
)
queryset = self.apply_sorting(queryset)
adventures = self.paginate_and_respond(queryset, request)
return adventures
serializer = self.get_serializer(queryset, many=True)
return Response(serializer.data)
def paginate_and_respond(self, queryset, request):
paginator = self.pagination_class()