Beispiel #1
0
 def post(self, request, format=None, **kwargs):
     """
         Post request to get all vulnerability Data.
     """
     serializer = NetworkScanResultSerializer(data=request.data)
     if serializer.is_valid():
         scan_id = request.data.get('scan_id', )
         all_scans = ov_scan_result_db.objects.filter(scan_id=scan_id)
         serialized_scans = NetworkScanResultSerializer(all_scans, many=True)
         return Response(serialized_scans.data)
Beispiel #2
0
 def post(self, request, format=None, **kwargs):
     """
         Post request to get all vulnerability Data.
     """
     serializer = NetworkScanResultSerializer(data=request.data)
     if serializer.is_valid():
         scan_id = request.data.get('scan_id',)
         all_scans = ov_scan_result_db.objects.filter(scan_id=scan_id)
         serialized_scans = NetworkScanResultSerializer(all_scans, many=True)
         return Response(serialized_scans.data)