From 1902c3792400b51dd84aa1c74ea0a250e59d0875 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sun, 17 Apr 2022 11:51:36 +0800 Subject: [PATCH] organization --- internal/api/organization/organization.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go index 3ff448e1e..53542ea97 100644 --- a/internal/api/organization/organization.go +++ b/internal/api/organization/organization.go @@ -59,8 +59,9 @@ func UpdateDepartment(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.UpdateDepartmentReq{} + req := &rpc.UpdateDepartmentReq{DepartmentInfo: &open_im_sdk.Department{}} utils.CopyStructFields(req, ¶ms) + utils.CopyStructFields(req.DepartmentInfo, ¶ms) err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID) req.OpUserID = opUserID if err != nil { @@ -70,7 +71,7 @@ func UpdateDepartment(c *gin.Context) { return } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String()) + log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api args ", req.String(), "params", params) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName) client := rpc.NewOrganizationClient(etcdConn) RpcResp, err := client.UpdateDepartment(context.Background(), req)