mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
feat: 添加/修改通知方式时可选择不发送测试信息
This commit is contained in:
@@ -395,6 +395,7 @@ type notificationForm struct {
|
||||
RequestHeader string
|
||||
RequestBody string
|
||||
VerifySSL string
|
||||
SkipCheck string
|
||||
}
|
||||
|
||||
func (ma *memberAPI) addOrEditNotification(c *gin.Context) {
|
||||
@@ -416,7 +417,12 @@ func (ma *memberAPI) addOrEditNotification(c *gin.Context) {
|
||||
Notification: &n,
|
||||
Server: nil,
|
||||
}
|
||||
err = ns.Send("这是测试消息")
|
||||
// 勾选了跳过检查
|
||||
if nf.SkipCheck == "on" {
|
||||
err = nil
|
||||
} else {
|
||||
err = ns.Send("这是测试消息")
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
// 保证Tag不为空
|
||||
|
||||
Reference in New Issue
Block a user