From f386b112670d85248a0007a53d66e16175015b41 Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Wed, 17 Jan 2024 14:40:00 +0800 Subject: [PATCH] fix: fix the code localtion --- internal/api/msg.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/api/msg.go b/internal/api/msg.go index 52070d6e5..123e8eae0 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -477,11 +477,6 @@ func (m *MessageApi) CallbackExample(c *gin.Context) { //"req.Content": "{\"sourcePath\":\"/screenshot1705471793324.png\",\"sourcePicture\":{\"uuid\":\"6f9660f9-6c8b-42e2-a38b-773f67466772/screenshot1705471793324.png\",\"type\":\"image/png\",\"size\":654,\"width\":167,\"height\":196,\"url\":\"http://150.109.93.151:10002/object/3097485888/msg_picture_b09c0b7b433a050fa84a563d7b82c576.png\"},\"bigPicture\":{\"uuid\":\"6f9660f9-6c8b-42e2-a38b-773f67466772/screenshot1705471793324.png\",\"type\":\"image/png\",\"size\":654,\"width\":167,\"height\":196,\"url\":\"http://150.109.93.151:10002/object/3097485888/msg_picture_b09c0b7b433a050fa84a563d7b82c576.png\"},\"snapshotPicture\":{\"size\":0,\"width\":640,\"height\":640,\"url\":\"http://150.109.93.151:10002/object/3097485888/msg_picture_b09c0b7b433a050fa84a563d7b82c576.png?height=640\\u0026type=image\\u0026width=640\"}}" con := apistruct.PictureElem{} - content["sourcePath"] = con.SourcePath - content["sourcePicture"] = con.SourcePicture - content["bigPicture"] = con.BigPicture - content["snapshotPicture"] = con.SnapshotPicture - err = json.Unmarshal([]byte(req.Content), &con) if err != nil { log.ZError(c, "picktureStruct unmarshal failed", err) @@ -489,6 +484,10 @@ func (m *MessageApi) CallbackExample(c *gin.Context) { return } log.ZDebug(c, "CallbackExample PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE PICKTURE ", con) + content["sourcePath"] = con.SourcePath + content["sourcePicture"] = con.SourcePicture + content["bigPicture"] = con.BigPicture + content["snapshotPicture"] = con.SnapshotPicture } log.ZDebug(c, "CallbackExample CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT ", content)