From 9f525ae439b1d5392423b2b4481ef8e6a187ce5a Mon Sep 17 00:00:00 2001 From: saurav-malani Date: Wed, 21 Sep 2022 12:32:00 +0530 Subject: [PATCH] removed batch deletion using phone & email --- regulation-worker/internal/delete/batch/batch.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/regulation-worker/internal/delete/batch/batch.go b/regulation-worker/internal/delete/batch/batch.go index b1df5555070..361552a38e7 100644 --- a/regulation-worker/internal/delete/batch/batch.go +++ b/regulation-worker/internal/delete/batch/batch.go @@ -348,20 +348,6 @@ func (b *Batch) createPatternFile(userAttributes []model.User) (string, error) { searchObject = append(searchObject, "\"userId\": *\""...) searchObject = append(searchObject, users.ID...) searchObject = append(searchObject, "\"/d;"...) - - if users.Attributes["email"] != "" { - searchObject = append(searchObject, "/"...) - searchObject = append(searchObject, "\"email\": *\""...) - searchObject = append(searchObject, []byte(users.Attributes["email"])...) - searchObject = append(searchObject, "\"/d;"...) - } - - if users.Attributes["phone"] != "" { - searchObject = append(searchObject, "/"...) - searchObject = append(searchObject, "\"phone\": *\""...) - searchObject = append(searchObject, []byte(users.Attributes["phone"])...) - searchObject = append(searchObject, "\"/d;"...) - } } PatternFilePtr, err := os.CreateTemp(b.TmpDirPath, "")