feat(notification): add option to convert metric units in request body (#1156)

* feat(notification): add option to convert metric units in request body

* ignore gosec

* rename fields
This commit is contained in:
UUBulb
2026-01-10 17:29:10 +08:00
committed by GitHub
parent 6067a41038
commit 302d278644
5 changed files with 124 additions and 29 deletions
+4
View File
@@ -59,6 +59,8 @@ func createNotification(c *gin.Context) (uint64, error) {
n.URL = nf.URL
verifyTLS := nf.VerifyTLS
n.VerifyTLS = &verifyTLS
formatMetricUnits := nf.FormatMetricUnits
n.FormatMetricUnits = &formatMetricUnits
ns := model.NotificationServerBundle{
Notification: &n,
@@ -120,6 +122,8 @@ func updateNotification(c *gin.Context) (any, error) {
n.URL = nf.URL
verifyTLS := nf.VerifyTLS
n.VerifyTLS = &verifyTLS
formatMetricUnits := nf.FormatMetricUnits
n.FormatMetricUnits = &formatMetricUnits
ns := model.NotificationServerBundle{
Notification: &n,