Fixed Json Output
This commit is contained in:
+5
-2
@@ -35,9 +35,12 @@ def allowlistexechistories(url, outputjson: bool):
|
||||
if (datetime.date.today() - datetime.timedelta(days=1) > datetime.datetime.strptime(item['datetime'].replace(' +0000 UTC', ''), '%Y-%m-%dT%H:%M:%SZ').date()):
|
||||
pass
|
||||
else:
|
||||
json_output['response']['exechistories'].append(json_response_data['response']['exechistories'])
|
||||
#json_output['response']['exechistories'].append(json_response_data['response']['exechistories'][1])
|
||||
for output in json_response_data['response']['exechistories']:
|
||||
json_output['response']['exechistories'].append(output)
|
||||
json_output = json.dumps(json_output)
|
||||
if outputjson == True:
|
||||
return (json_output)
|
||||
return json_output
|
||||
#endpoint = url + '/v1/logging/exechistories'
|
||||
#payload_dict = {
|
||||
# "type":[1, 2, 6, 7],
|
||||
|
||||
Reference in New Issue
Block a user