fix: Returning results in text format

- Makes the hover functionality display the full
  result instead of skipping the records list
pull/339/head
chrisr3d 2019-10-04 15:54:25 +02:00
parent 73302bef1e
commit 6801289175
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ def handler(q=False):
data = {'ip': ip}
r = requests.post(greynoise_api_url, data=data, headers={'user-agent': default_user_agent}) # Real request
if r.status_code == 200: # OK (record found)
response = json.loads(r.text)
response = r.text
if response:
return {'results': [{'types': mispattributes['output'], 'values': response}]}
elif r.status_code == 404: # Not found (not an error)