Skip to content

Commit

Permalink
🚧 [bug] Fix models json tag error (opsre#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbzss authored Jan 16, 2025
1 parent 98b55eb commit 9e91022
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/models/notice.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type AlertNotice struct {
NoticeTmplId string `json:"noticeTmplId"`
Hook string `json:"hook"`
Email Email `json:"email" gorm:"email;serializer:json"`
PhoneNumber []string `json:"phoneNumber" gorm:"email;serializer:json"`
PhoneNumber []string `json:"phoneNumber" gorm:"phoneNumber;serializer:json"`
}

type Email struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/models/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,5 @@ func (a *AlertRule) GetEnabled() *bool {
isOk := false
return &isOk
}
return a.RecoverNotify
return a.Enabled
}

0 comments on commit 9e91022

Please sign in to comment.