Loading openapi.yml +7 −12 Original line number Diff line number Diff line Loading @@ -299,21 +299,16 @@ paths: $ref: "#/components/responses/Success" '500': $ref: "#/components/responses/Error" /progress/: /progress/{username}: get: tags: - trainee-progress requestBody: parameters: - name: username in: path required: true content: application/json: schema: type: object properties: username: type: string required: - username responses: '200': $ref: "#/components/responses/TraineeProgressResponse" Loading running_exercise/urls.py +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ urlpatterns = [ name="create-sandbox-log", ), path( "progress/", "progress/<str:username>/", views.TraineeProgressView.as_view(), name="get-trainee-progress", ), Loading running_exercise/views.py +2 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,8 @@ class TraineeProgressView(APIView): @protected(User.AuthGroup.ADMIN, EndpointPermissions.GET_TRAINEE_PROGRESS) def get(self, request, *args, **kwargs): """Retrieve the progress of the given trainee""" username = request.data.get("username", None) username = self.kwargs.get("username", None) print(username) if username is None: raise ApiException( "Invalid request, missing required `username` parameter" Loading Loading
openapi.yml +7 −12 Original line number Diff line number Diff line Loading @@ -299,21 +299,16 @@ paths: $ref: "#/components/responses/Success" '500': $ref: "#/components/responses/Error" /progress/: /progress/{username}: get: tags: - trainee-progress requestBody: parameters: - name: username in: path required: true content: application/json: schema: type: object properties: username: type: string required: - username responses: '200': $ref: "#/components/responses/TraineeProgressResponse" Loading
running_exercise/urls.py +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ urlpatterns = [ name="create-sandbox-log", ), path( "progress/", "progress/<str:username>/", views.TraineeProgressView.as_view(), name="get-trainee-progress", ), Loading
running_exercise/views.py +2 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,8 @@ class TraineeProgressView(APIView): @protected(User.AuthGroup.ADMIN, EndpointPermissions.GET_TRAINEE_PROGRESS) def get(self, request, *args, **kwargs): """Retrieve the progress of the given trainee""" username = request.data.get("username", None) username = self.kwargs.get("username", None) print(username) if username is None: raise ApiException( "Invalid request, missing required `username` parameter" Loading