diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go index 8a651af47..413928a64 100644 --- a/internal/api/organization/organization.go +++ b/internal/api/organization/organization.go @@ -25,7 +25,6 @@ func CreateDepartment(c *gin.Context) { } req := &rpc.CreateDepartmentReq{DepartmentInfo: &open_im_sdk.Department{}} utils.CopyStructFields(req, ¶ms) - utils.CopyStructFields(req.DepartmentInfo, params.Department) err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID) req.OpUserID = opUserID if err != nil { diff --git a/pkg/base_info/organization_api_struct.go b/pkg/base_info/organization_api_struct.go index a52a84f65..0289b2f81 100644 --- a/pkg/base_info/organization_api_struct.go +++ b/pkg/base_info/organization_api_struct.go @@ -13,7 +13,7 @@ type CreateDepartmentResp struct { } type UpdateDepartmentReq struct { - open_im_sdk.Department + *open_im_sdk.Department DepartmentID string `json:"departmentID" binding:"required"` OperationID string `json:"operationID" binding:"required"` }