From 9e91022a2bf65c93c7af4bf08c8878c1d6776a67 Mon Sep 17 00:00:00 2001 From: lbzs <42933987+lbzss@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20[bug]=20Fix=20models=20json=20ta?= =?UTF-8?q?g=20error=20(#122)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/models/notice.go | 2 +- internal/models/rule.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/models/notice.go b/internal/models/notice.go index 3049c9d..ed29577 100644 --- a/internal/models/notice.go +++ b/internal/models/notice.go @@ -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 { diff --git a/internal/models/rule.go b/internal/models/rule.go index ebe6e7a..e3b72b3 100644 --- a/internal/models/rule.go +++ b/internal/models/rule.go @@ -212,5 +212,5 @@ func (a *AlertRule) GetEnabled() *bool { isOk := false return &isOk } - return a.RecoverNotify + return a.Enabled }