Skip to content

Commit

Permalink
feat: upgrading simple api to drf compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 committed Jul 15, 2024
1 parent 3199edf commit ae35283
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lms/djangoapps/instructor/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,7 @@ def list_background_email_tasks(request, course_id):
return JsonResponse(response_payload)


class ListCourseRoleMembersView(APIView):
class ListEmailContent(APIView):
"""
List the content of bulk emails sent
"""
Expand All @@ -2181,7 +2181,7 @@ def post(self, request, course_id):
response_payload = {
'emails': list(map(extract_email_features, emails)),
}
return Response(response_payload)
return JsonResponse(response_payload)


class InstructorTaskSerializer(serializers.Serializer): # pylint: disable=abstract-method
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/instructor/views/api_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
name='mark_student_can_skip_entrance_exam'),
path('list_instructor_tasks', api.list_instructor_tasks, name='list_instructor_tasks'),
path('list_background_email_tasks', api.list_background_email_tasks, name='list_background_email_tasks'),
path('list_email_content', api.ListCourseRoleMembersView.as_view(), name='list_email_content'),
path('list_email_content', api.ListEmailContent.as_view(), name='list_email_content'),
path('list_forum_members', api.list_forum_members, name='list_forum_members'),
path('update_forum_role_membership', api.update_forum_role_membership, name='update_forum_role_membership'),
path('send_email', api.send_email, name='send_email'),
Expand Down

0 comments on commit ae35283

Please sign in to comment.