chore [P-01]: подтянул бэк

This commit is contained in:
Denis Voinovich committed 2025-06-04 13:25:32 +03:00
commit 59ee774aeb
1 file changed
+4 -4
+4 -4
View File
@@ -51,7 +51,7 @@ class GetTests(generics.ListAPIView):
400: 'error',
}
)
def get (self, request):
def get (self, request, *args, **kwargs):
"""receives tests assigned to the user"""
user = request.user
# user = User.objects.get(username='9966-00-125')
@@ -124,7 +124,7 @@ class TestDetail(generics.RetrieveUpdateDestroyAPIView):
lookup_url_kwarg = 'id'
lookup_field = 'id'
def get(self, request):
def get(self, request, *args, **kwargs):
"""Processes a GET request to retrieve detailed information about a test."""
test = self.get_object()
number_of_questions = test.question_count
@@ -405,7 +405,7 @@ class TestResultView(generics.ListCreateAPIView):
400: 'error',
}
)
def get(self, request):
def get(self, request, *args, **kwargs):
"""Get the results of the last user test attempt."""
user = request.user
# user = User.objects.get(username = "9966-00-125")
@@ -448,7 +448,7 @@ class TestResultView(generics.ListCreateAPIView):
400: 'error',
}
)
def post(self, request):
def post(self, request, *args, **kwargs):
"""Saves the results of a new test attempt."""
try:
user = request.user