diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go index ee8ee6489..4778dc866 100644 --- a/internal/api/organization/organization.go +++ b/internal/api/organization/organization.go @@ -24,6 +24,7 @@ func CreateDepartment(c *gin.Context) { } req := &rpc.CreateDepartmentReq{} 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 { diff --git a/pkg/base_info/organization_api_struct.go b/pkg/base_info/organization_api_struct.go index 380678336..a52a84f65 100644 --- a/pkg/base_info/organization_api_struct.go +++ b/pkg/base_info/organization_api_struct.go @@ -3,7 +3,7 @@ package base_info import open_im_sdk "Open_IM/pkg/proto/sdk_ws" type CreateDepartmentReq struct { - open_im_sdk.Department + *open_im_sdk.Department OperationID string `json:"operationID" binding:"required"` } type CreateDepartmentResp struct {