chg: Catching missing config issue

pull/380/head
chrisr3d 2020-02-25 15:22:06 +01:00
parent 6111f02f59
commit dea42d3929
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ def handler(q=False):
return False
q = json.loads(q)
if "config" not in q or "api-key" not in q["config"]:
return {"error": "Ransomcoindb API key is missing"}
api_key = q["config"]["api-key"]
r = {"results": []}