From 24653af5e242d1f5dbca8c9c03d2d110feb51b2f Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 28 Jan 2022 15:15:20 +0100 Subject: [PATCH] feat(integrations): fixed source --- backend/services/integrations/integration/elasticsearch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/services/integrations/integration/elasticsearch.go b/backend/services/integrations/integration/elasticsearch.go index f19b28563..8c85a3fe9 100644 --- a/backend/services/integrations/integration/elasticsearch.go +++ b/backend/services/integrations/integration/elasticsearch.go @@ -136,13 +136,13 @@ func (es *elasticsearch) Request(c *client) error { doc := hit.(map[string]interface{}) source := doc["_source"].(map[string]interface{}) - if _, ok := esResp["message"]; !ok { + if _, ok := source["message"]; !ok { log.Printf("message not found in doc \n%v\n", doc) c.errChan <- fmt.Errorf("message not found in doc '%v' ", doc) continue } - if _, ok := esResp["utc_time"]; !ok { + if _, ok := source["utc_time"]; !ok { log.Printf("utc_time not found in doc \n%v\n", doc) c.errChan <- fmt.Errorf("utc_time not found in doc '%v' ", doc) continue