From 1f493c427a0b429e3dc5ea760cf05af2fe30345a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 13 Jan 2022 11:16:55 +0800 Subject: [PATCH] Refactor code --- internal/api/user/user.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index f5f02c8cd..d249486e6 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -94,6 +94,7 @@ func GetSelfUserInfo(c *gin.Context) { return } req := &rpc.GetUserInfoReq{} + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -102,6 +103,7 @@ func GetSelfUserInfo(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } + req.UserIDList = append(req.UserIDList, req.OpUserID) log.NewInfo(params.OperationID, "GetUserInfo args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)