From b4ab2c69ae80773db4c8a305499062a87d299518 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sat, 16 Apr 2022 21:20:17 +0800 Subject: [PATCH] organization --- internal/api/organization/organization.go | 1 + pkg/base_info/organization_api_struct.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 {