Skip to content

Commit e558a78

Browse files
committed
fix: update TagRulesApplied field type to slice and join in conversion
1 parent f23aab5 commit e558a78

2 files changed

Lines changed: 2 additions & 2 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: alert.TagRulesApplied,
17+
TagRulesApplied: strings.Join(alert.TagRulesApplied, ","),
1818
SeverityLabel: alert.SeverityLabel,
1919
Notes: alert.Notes,
2020
DataType: alert.DataType,

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 []string `json:"TagRulesApplied,omitempty"`
106106
SeverityLabel string `json:"severityLabel"`
107107
Notes string `json:"notes"`
108108
DataType string `json:"dataType"`

0 commit comments

Comments
 (0)