From 0f0bf645f903d471bf72d6ecf7357fc65987c76d Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Tue, 16 Jan 2024 18:43:26 +0800 Subject: [PATCH] fix: fix the error --- internal/api/msg.go | 2 +- pkg/common/http/http_client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/msg.go b/internal/api/msg.go index 88f25a425..81564f138 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -461,7 +461,7 @@ func (m *MessageApi) CallbackExample(c *gin.Context) { } content := make(map[string]any, 1) - content["content"] = req.Content + content[""] = req.Content input := &apistruct.SendMsgReq{ RecvID: req.SendID, SendMsg: apistruct.SendMsg{ diff --git a/pkg/common/http/http_client.go b/pkg/common/http/http_client.go index bae78349c..fc04ec2a8 100644 --- a/pkg/common/http/http_client.go +++ b/pkg/common/http/http_client.go @@ -70,7 +70,7 @@ func Post(ctx context.Context, url string, header map[string]string, data any, t } log.ZInfo(ctx, "CallbackExample", "jsonStraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", jsonStr) - log.ZInfo(ctx, "CallbackExample", "jsonStr", jsonStr) + log.ZInfo(ctx, "CallbackExample", "jsonStr", string(jsonStr)) req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(jsonStr)) if err != nil {