增加飞书webhook监听处理

This commit is contained in:
laodaming 2023-11-07 14:39:34 +08:00
parent 39283bf55f
commit 3429f61ebc

View File

@ -6,7 +6,7 @@ import (
"fusenapi/server/feishu-sync/internal/svc"
"fusenapi/utils/feishu"
"github.com/zeromicro/go-zero/core/logx"
"io/ioutil"
"io"
"net/http"
)
@ -45,7 +45,7 @@ type BaseWebhookMsgHeaderType struct {
}
func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) {
bodyBytes, err := ioutil.ReadAll(r.Body)
bodyBytes, err := io.ReadAll(r.Body)
if err != nil {
logx.Error("读取请求body失败", err)
return