Browse Source

[ASN description] Fix input type

pull/21/head
Raphaël Vinot 6 years ago
parent
commit
5703b9c0f3
  1. 6
      modules/expansion/asn_history.py

6
modules/expansion/asn_history.py

@ -4,7 +4,7 @@ import json @@ -4,7 +4,7 @@ import json
from asnhistory import ASNHistory
misperrors = {'error': 'Error'}
mispattributes = {'input': ['asn'], 'output': ['freetext']}
mispattributes = {'input': ['AS'], 'output': ['freetext']}
moduleinfo = {'version': '0.1', 'author': 'Raphaël Vinot',
'description': 'Query an ASN Description history service (https://github.com/CIRCL/ASN-Description-History.git)',
'module-type': ['expansion', 'hover']}
@ -16,8 +16,8 @@ def handler(q=False): @@ -16,8 +16,8 @@ def handler(q=False):
if q is False:
return False
request = json.loads(q)
if request.get('asn'):
toquery = request['asn']
if request.get('AS'):
toquery = request['AS']
else:
misperrors['error'] = "Unsupported attributes type"
return misperrors

Loading…
Cancel
Save