From 7c64239b36088d69c7f4d6be3c8631068ac492bb Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sun, 17 Apr 2022 14:39:48 +0800 Subject: [PATCH] organization --- cmd/open_im_api/main.go | 2 ++ internal/api/organization/organization.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 4ffca2a56..a2f8522ef 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -154,9 +154,11 @@ func main() { organizationGroup.POST("/update_department", organization.UpdateDepartment) organizationGroup.POST("/get_sub_department", organization.GetSubDepartment) organizationGroup.POST("/delete_department", organization.DeleteDepartment) + organizationGroup.POST("/create_organization_user", organization.CreateOrganizationUser) organizationGroup.POST("/update_organization_user", organization.UpdateOrganizationUser) organizationGroup.POST("/create_department_member", organization.CreateDepartmentMember) + organizationGroup.POST("/get_user_in_department", organization.GetUserInDepartment) organizationGroup.POST("/update_user_In_department", organization.UpdateUserInDepartment) organizationGroup.POST("/delete_organization_user", organization.DeleteOrganizationUser) diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go index 7a951e763..7ae90b480 100644 --- a/internal/api/organization/organization.go +++ b/internal/api/organization/organization.go @@ -163,8 +163,9 @@ func CreateOrganizationUser(c *gin.Context) { return } - req := &rpc.CreateOrganizationUserReq{} + req := &rpc.CreateOrganizationUserReq{OrganizationUser: &open_im_sdk.OrganizationUser{}} utils.CopyStructFields(req, ¶ms) + utils.CopyStructFields(req.OrganizationUser, ¶ms) err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID) req.OpUserID = opUserID