def post(self, request, *args, **kwargs): event = json.loads(request.body)['event'] event.update( find_by_event(event['check']['name'], event['check']['output'])) return HttpResponse(json.dumps(event))
def post(self, request, *args, **kwargs): output = [] try: events = json.loads(request.body)['events'] for event in events: event.update(find_by_event(event["check"])) output.append(event) except Exception as e: raise e log.error(e) return HttpResponse(json.dumps(output))