【调整】WEBHOOK参数传递为空时的默认值

This commit is contained in:
wantoper
2025-05-30 15:01:52 +08:00
parent f38af158b9
commit b40da5378f

View File

@@ -34,6 +34,10 @@ func NewWebHookReporter(config *ReportConfig, logger *public.Logger) *WebHookRep
client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true}) client.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
} }
if config.Data == "" {
config.Data = "{}" // 默认数据为空JSON对象
}
return &WebHookReporter{ return &WebHookReporter{
config: config, config: config,
logger: logger, logger: logger,