threads.py 430 B

12345678910111213
  1. from rest_framework import viewsets
  2. from rest_framework.parsers import JSONParser
  3. from misago.users.rest_permissions import IsAuthenticatedOrReadOnly
  4. from misago.threads.api.threadendpoints.list import threads_list_endpoint
  5. class ThreadViewSet(viewsets.ViewSet):
  6. permission_classes = (IsAuthenticatedOrReadOnly, )
  7. parser_classes=(JSONParser, )
  8. def list(self, request):
  9. return threads_list_endpoint(request)