This commit is contained in:
laodaming 2023-11-06 17:35:13 +08:00
parent e5fbfd1a93
commit 71f7be0149

View File

@ -16,8 +16,6 @@ import (
func WebhookHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
b, _ := io.ReadAll(r.Body)
log.Println("收到body信息:", string(b))
var req types.WebhookReq
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
if err != nil {
@ -32,6 +30,8 @@ func WebhookHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
w.Write(b)
return
}
b, _ := io.ReadAll(r.Body)
log.Println("收到body信息:", string(b))
log.Println("收到头消息:", r.Header)
// 创建一个业务逻辑层实例
l := logic.NewWebhookLogic(r.Context(), svcCtx)