post-game info
This commit is contained in:
@@ -31,3 +31,10 @@ class SessionDetailView(APIView):
|
||||
def get(self, request, session_id):
|
||||
session = Session.objects.get(session_id=session_id)
|
||||
return Response(SessionSerializer(session).data)
|
||||
|
||||
|
||||
class SessionInfoView(APIView):
|
||||
def get(self, request, session_id):
|
||||
track_count = len(Track.objects.all())
|
||||
vote_count = len(Vote.objects.all())
|
||||
return Response({'track_count': track_count, 'vote_count': vote_count})
|
||||
|
||||
Reference in New Issue
Block a user