Browse Source

rename status to state in fire response (#2313)

blotus 2 năm trước cách đây
mục cha
commit
e61d5a3034
2 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 3 0
      pkg/cticlient/example/fire.go
  2. 1 1
      pkg/cticlient/types.go

+ 3 - 0
pkg/cticlient/example/fire.go

@@ -44,6 +44,9 @@ func main() {
 		}
 
 		for _, item := range items {
+			if item.State == "refused" {
+				continue
+			}
 			banDuration := time.Until(item.Expiration.Time)
 			allItems = append(allItems, []string{
 				item.Ip,

+ 1 - 1
pkg/cticlient/types.go

@@ -120,7 +120,7 @@ type FireItem struct {
 	BackgroundNoiseScore *int                `json:"background_noise_score"`
 	Scores               CTIScores           `json:"scores"`
 	References           []CTIReferences     `json:"references"`
-	Status               string              `json:"status"`
+	State                string              `json:"state"`
 	Expiration           CustomTime          `json:"expiration"`
 }