コード例 #1
0
 def list(self, request, **kwargs):
     try:
         ipaddress = request.query_params.get('ipaddress', None)
         context = Vulnerability.list(ipaddress=ipaddress)
     except Exception as E:
         logger.error(E)
         context = data_return(500, CODE_MSG.get(500), [])
     return Response(context)
コード例 #2
0
ファイル: views.py プロジェクト: j5s/viperpython
 def list(self, request, **kwargs):
     try:
         hid = int(request.query_params.get('hid', -1))
         context = Vulnerability.list(hid=hid)
     except Exception as E:
         logger.error(E)
         context = data_return(500, CODE_MSG.get(500), [])
     return Response(context)