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

pull/193/head
wantoper 2025-05-30 15:01:52 +08:00
parent f38af158b9
commit b40da5378f
1 changed files with 4 additions and 0 deletions

View File

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