提交 dcba4fef 编写于 作者: W wenxu12345

Refactor code

上级 a654073c
......@@ -17,6 +17,7 @@ import (
"strings"
jsonData "Open_IM/internal/utils"
"github.com/golang/protobuf/proto"
)
func KickGroupMember(c *gin.Context) {
......@@ -186,6 +187,7 @@ func GetGroupAllMemberList(c *gin.Context) {
//}
memberListResp.Test = jsonData.JsonDataList(memberListResp.MemberList)
log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp)
c.JSON(http.StatusOK, memberListResp)
}
......
......@@ -8,8 +8,8 @@ import (
func JsonDataList(resp ...interface{}) []map[string]interface{} {
result := make([]map[string]interface{}, 0)
for _, v := range resp {
m := ProtoToMap(v.(proto.Message), false)
for _, v := range resp[0].([]proto.Message) {
m := ProtoToMap(v, false)
result = append(result, m)
}
return result
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册