We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbabce7 commit 35a59f1Copy full SHA for 35a59f1
classroom/views.py
@@ -71,11 +71,10 @@ class GetClassroomJitsiChannelsView(views.APIView):
71
72
def get(self, request):
73
user: ManthanoUser = request.user
74
- response = {}
75
- for i in user.classroom.jitsi_channels.all():
76
- response[i.id] = i.name
+ serializer = JitsiChannelSerializer(user.classroom.jitsi_channels.all(), many=True)
+
77
if user.classroom is not None:
78
- return Response(response, status=status.HTTP_200_OK)
+ return Response(serializer.data, status=status.HTTP_200_OK)
79
return Response(status=status.HTTP_404_NOT_FOUND)
80
81
0 commit comments