from rest_framework import permissions, viewsets
from bricksets.api.serializers import BrickSetSerializer
from bricksets.models import BrickSet


class BrickSetViewSet(viewsets.ModelViewSet):
    queryset = BrickSet.objects.all().order_by("-created")
    serializer_class = BrickSetSerializer
    permission_classes = [permissions.IsAuthenticated]
