Skip to content

Commit

Permalink
[DONE] In the Rest API, add a video and role filter for contributors (#…
Browse files Browse the repository at this point in the history
…1039)

* In the REst API, add a video and role filter for contributors

* In the Rest API, add a video filter for documents, tracks and overlays
  • Loading branch information
LoicBonavent authored Jan 31, 2024
1 parent cc55d9d commit eaa2941
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pod/completion/rest_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,22 @@ class Meta:
class ContributorViewSet(viewsets.ModelViewSet):
queryset = Contributor.objects.all()
serializer_class = ContributorSerializer
filterset_fields = ['video', 'role',]


class DocumentViewSet(viewsets.ModelViewSet):
queryset = Document.objects.all()
serializer_class = DocumentSerializer
filterset_fields = ['video',]


class TrackViewSet(viewsets.ModelViewSet):
queryset = Track.objects.all()
serializer_class = TrackSerializer
filterset_fields = ['video',]


class OverlayViewSet(viewsets.ModelViewSet):
queryset = Overlay.objects.all()
serializer_class = OverlaySerializer
filterset_fields = ['video',]

0 comments on commit eaa2941

Please sign in to comment.