From f889e6d12e634b739bb27245e32e2db860c95344 Mon Sep 17 00:00:00 2001 From: Mario Raciti <mario.raciti@inaf.it> Date: Mon, 22 Mar 2021 17:39:01 +0100 Subject: [PATCH] TMSS-692: Add report endpoint for Project --- .../backend/src/tmss/tmssapp/viewsets/specification.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py index 9605ead221a..d78c258081f 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py @@ -282,6 +282,14 @@ class ProjectViewSet(LOFARViewSet): return queryset + @swagger_auto_schema(responses={200: 'The Report', + 403: 'forbidden'}, + operation_description="Get Report for the project.") + @action(methods=['get'], detail=True, url_name="report", name="Get Report") + def report(self, request, pk=None): + # TODO: Decide how to retrieve the information needed: recipe of existing APIs or all in one go. + pass + class ProjectNestedViewSet(LOFARNestedViewSet): queryset = models.Project.objects.all() -- GitLab