Fixed #240: ignored page_size paremeter on artist and favorites list

merge-requests/237/head
Eliot Berriot 2018-05-29 23:20:57 +02:00
rodzic d2c99b9f5d
commit 540c6fb583
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
4 zmienionych plików z 2 dodań i 12 usunięć

Wyświetl plik

@ -3,4 +3,4 @@ from rest_framework.pagination import PageNumberPagination
class FunkwhalePagination(PageNumberPagination):
page_size_query_param = 'page_size'
max_page_size = 25
max_page_size = 50

Wyświetl plik

@ -12,12 +12,6 @@ from . import models
from . import serializers
class CustomLimitPagination(pagination.PageNumberPagination):
page_size = 100
page_size_query_param = 'page_size'
max_page_size = 100
class TrackFavoriteViewSet(mixins.CreateModelMixin,
mixins.DestroyModelMixin,
mixins.ListModelMixin,
@ -26,7 +20,6 @@ class TrackFavoriteViewSet(mixins.CreateModelMixin,
serializer_class = serializers.UserTrackFavoriteSerializer
queryset = (models.TrackFavorite.objects.all())
permission_classes = [ConditionalAuthentication]
pagination_class = CustomLimitPagination
def create(self, request, *args, **kwargs):
serializer = self.get_serializer(data=request.data)

Wyświetl plik

@ -0,0 +1 @@
Fixed ignored page_size paremeter on artist and favorites list (#240)

Wyświetl plik

@ -136,19 +136,15 @@ export default {
watch: {
page: function () {
this.updateQueryString()
this.fetchFavorites(FAVORITES_URL)
},
paginateBy: function () {
this.updateQueryString()
this.fetchFavorites(FAVORITES_URL)
},
orderingDirection: function () {
this.updateQueryString()
this.fetchFavorites(FAVORITES_URL)
},
ordering: function () {
this.updateQueryString()
this.fetchFavorites(FAVORITES_URL)
}
}
}