From d949ee0239551acf25fb83c8d0c3d44fbc587e30 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sun, 17 Apr 2022 15:09:18 +0800 Subject: [PATCH] organization --- internal/api/organization/organization.go | 2 +- pkg/base_info/organization_api_struct.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go index 13402d044..714b26a7e 100644 --- a/internal/api/organization/organization.go +++ b/internal/api/organization/organization.go @@ -192,7 +192,7 @@ func CreateOrganizationUser(c *gin.Context) { } func UpdateOrganizationUser(c *gin.Context) { - params := api.UpdateOrganizationUserReq{OrganizationUser: &open_im_sdk.OrganizationUser{}} + params := api.UpdateOrganizationUserReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) diff --git a/pkg/base_info/organization_api_struct.go b/pkg/base_info/organization_api_struct.go index 7243d310b..ac80f82df 100644 --- a/pkg/base_info/organization_api_struct.go +++ b/pkg/base_info/organization_api_struct.go @@ -48,16 +48,16 @@ type CreateOrganizationUserResp struct { } type UpdateOrganizationUserReq struct { - OperationID string `json:"operationID" binding:"required"` - OrganizationUser *open_im_sdk.OrganizationUser + OperationID string `json:"operationID" binding:"required"` + *open_im_sdk.OrganizationUser } type UpdateOrganizationUserResp struct { CommResp } type CreateDepartmentMemberReq struct { - OperationID string `json:"operationID" binding:"required"` - UserInDepartment *open_im_sdk.UserInDepartment + OperationID string `json:"operationID" binding:"required"` + *open_im_sdk.UserInDepartment } type CreateDepartmentMemberResp struct { @@ -65,7 +65,7 @@ type CreateDepartmentMemberResp struct { } type GetUserInDepartmentReq struct { - UserID string + UserID string `json:"userID" binding:"required"` OperationID string `json:"operationID" binding:"required"` } type GetUserInDepartmentResp struct { @@ -83,7 +83,7 @@ type UpdateUserInDepartmentResp struct { } type DeleteOrganizationUserReq struct { - UserID string + UserID string `json:"userID" binding:"required"` OperationID string `json:"operationID" binding:"required"` } type DeleteOrganizationUserResp struct { @@ -91,7 +91,7 @@ type DeleteOrganizationUserResp struct { } type GetDepartmentMemberReq struct { - DepartmentID string + DepartmentID string `json:"departmentID" binding:"required"` OperationID string `json:"operationID" binding:"required"` } type GetDepartmentMemberResp struct {