fix
This commit is contained in:
parent
2243208ae9
commit
07fcd4b7b7
|
@ -48,6 +48,7 @@ func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) {
|
|||
logx.Error("读取请求body失败", err)
|
||||
return
|
||||
}
|
||||
logx.Info("收到消息:", string(bodyBytes))
|
||||
defer r.Body.Close()
|
||||
//如果只是验证http连接的消息
|
||||
var webhookMsg WebhookMsg
|
||||
|
@ -55,7 +56,6 @@ func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) {
|
|||
logx.Error("反序列化请求body失败", err)
|
||||
return
|
||||
}
|
||||
logx.Info("收到消息:", webhookMsg)
|
||||
//验证连接(直接返回)
|
||||
if webhookMsg.Type == "url_verification" {
|
||||
challengeRsp := map[string]string{
|
||||
|
|
Loading…
Reference in New Issue
Block a user