Update yeti.py

change path to access config settings
pull/488/head
Sebdraven 2021-03-05 11:28:50 +01:00
parent 3fdce84ff7
commit e2a1ade14a
1 changed files with 6 additions and 4 deletions

View File

@ -64,10 +64,12 @@ def handler(q=False):
return False return False
request = json.loads(q) request = json.loads(q)
print(request) print(request)
if 'url' in request: apikey = None
yeti_url = request['url'] yeti_url = None
if 'apikey' in request: if 'config' in request and 'url' in request['config']:
apikey = request['apikey'] yeti_url = request['config']['url']
if 'config' in request and 'apikey' in request['config']:
apikey = request['config']['apikey']
if apikey and yeti_url: if apikey and yeti_url:
yeti_client = Yeti(yeti_url,apikey) yeti_client = Yeti(yeti_url,apikey)
if request.get('ip-dst'): if request.get('ip-dst'):