Skip to content

Commit

Permalink
feat: api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zawan-ila committed Feb 17, 2025
1 parent ffa72b1 commit 7d222bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions course_discovery/apps/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2372,6 +2372,7 @@ class Meta:
'email',
'programs',
'description',
'status',
'destination_url',
'pathway_type',
'course_run_statuses',
Expand Down
3 changes: 3 additions & 0 deletions course_discovery/apps/api/v1/views/pathways.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Views for accessing Pathway data """
from rest_framework import viewsets
from django_filters.rest_framework import DjangoFilterBackend

from course_discovery.apps.api import serializers
from course_discovery.apps.api.cache import CompressedCacheResponseMixin
Expand All @@ -11,6 +12,8 @@
class PathwayViewSet(CompressedCacheResponseMixin, viewsets.ReadOnlyModelViewSet):
permission_classes = (ReadOnlyByPublisherUser,)
serializer_class = serializers.PathwaySerializer
filter_backends = (DjangoFilterBackend,)
filterset_fields = ('status',)

def get_queryset(self):
excluded_restriction_types = get_excluded_restriction_types(self.request)
Expand Down

0 comments on commit 7d222bb

Please sign in to comment.