mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-05-06 05:38:50 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user