mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-19 21:27:55 +00:00
hacky fix for #61
This commit is contained in:
parent
4e827afe19
commit
f3e30ffcef
@ -345,7 +345,7 @@ def stats(event, context):
|
||||
"order": {
|
||||
"recovered_by": "desc"
|
||||
},
|
||||
"size": 5
|
||||
"size": 6
|
||||
},
|
||||
"aggs": {
|
||||
"recovered_by": {
|
||||
@ -393,6 +393,8 @@ def stats(event, context):
|
||||
|
||||
try:
|
||||
output['top_chasers'] = { x['key'] : x['recovered_by']['value'] for x in results['aggregations']['top_recovered']['buckets']}
|
||||
if "" in output['top_chasers']:
|
||||
del output['top_chasers'][""]
|
||||
except:
|
||||
pass
|
||||
|
||||
|
@ -46,16 +46,17 @@ payload = {
|
||||
"timeEpoch": 1612051825409,
|
||||
},
|
||||
"body": json.dumps({
|
||||
"datetime": "2021-06-06T01:10:07.629Z",
|
||||
"serial": "S4631407",
|
||||
"lat": 0,
|
||||
"lon": 0,
|
||||
"alt": 0,
|
||||
"recovered": True,
|
||||
"recovered_by": "string",
|
||||
"description": "string"
|
||||
# "datetime": "2021-06-06T01:10:07.629Z",
|
||||
# "serial": "S4631407",
|
||||
# "lat": 0,
|
||||
# "lon": 0,
|
||||
# "alt": 0,
|
||||
# "recovered": True,
|
||||
# "recovered_by": "string",
|
||||
# "description": "string"
|
||||
}),
|
||||
"isBase64Encoded": False,
|
||||
}
|
||||
# print(put(payload, {}))
|
||||
print(get(payload, {}))
|
||||
#print(get(payload, {}))
|
||||
print(stats(payload, {}))
|
Loading…
Reference in New Issue
Block a user