post-game info

This commit is contained in:
2025-08-20 22:48:01 +02:00
parent e72e2e6800
commit 9c94934ff3
4 changed files with 34 additions and 0 deletions
+7
View File
@@ -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})