Skip to content

Commit

Permalink
removed batch deletion using phone & email
Browse files Browse the repository at this point in the history
  • Loading branch information
saurav-malani committed Sep 21, 2022
1 parent adf7919 commit 9f525ae
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions regulation-worker/internal/delete/batch/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
Expand Down

0 comments on commit 9f525ae

Please sign in to comment.