Skip to content

Commit 2d92132

Browse files
committed
fix: change TagRulesApplied field type from string to slice of int
1 parent e558a78 commit 2d92132

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

soc-ai/schema/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func ConvertFromAlertToAlertDB(alert Alert) AlertGPTDetails {
1414
return AlertGPTDetails{
1515
AlertID: alert.ID,
1616
Severity: alert.Severity,
17-
TagRulesApplied: strings.Join(alert.TagRulesApplied, ","),
17+
TagRulesApplied: alert.TagRulesApplied,
1818
SeverityLabel: alert.SeverityLabel,
1919
Notes: alert.Notes,
2020
DataType: alert.DataType,

soc-ai/schema/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package schema
33
type AlertGPTDetails struct {
44
AlertID string `json:"alert_id,omitempty"`
55
Severity int `json:"severity,omitempty"`
6-
TagRulesApplied string `json:"tag_rules_applied,omitempty"`
6+
TagRulesApplied []int `json:"tag_rules_applied,omitempty"`
77
SeverityLabel string `json:"severity_label,omitempty"`
88
Notes string `json:"notes,omitempty"`
99
DataType string `json:"data_type,omitempty"`

soc-ai/schema/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ type AlertDetails []Alert
102102
type Alert struct {
103103
ID string `json:"id"`
104104
Severity int `json:"severity"`
105-
TagRulesApplied []string `json:"TagRulesApplied,omitempty"`
105+
TagRulesApplied []int `json:"TagRulesApplied,omitempty"`
106106
SeverityLabel string `json:"severityLabel"`
107107
Notes string `json:"notes"`
108108
DataType string `json:"dataType"`

0 commit comments

Comments
 (0)