From eae7a48991cc78401046ddba0f20e2b04477ed1c Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sun, 17 Apr 2022 14:44:44 +0800 Subject: [PATCH] organization --- internal/api/organization/organization.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go index 1bc0f30e9..383ae732b 100644 --- a/internal/api/organization/organization.go +++ b/internal/api/organization/organization.go @@ -156,7 +156,7 @@ func DeleteDepartment(c *gin.Context) { } func CreateOrganizationUser(c *gin.Context) { - params := api.CreateOrganizationUserReq{} + params := api.CreateOrganizationUserReq{OrganizationUser: &open_im_sdk.OrganizationUser{}} 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()}) @@ -192,7 +192,7 @@ func CreateOrganizationUser(c *gin.Context) { } func UpdateOrganizationUser(c *gin.Context) { - params := api.UpdateOrganizationUserReq{} + params := api.UpdateOrganizationUserReq{OrganizationUser: &open_im_sdk.OrganizationUser{}} 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()}) @@ -227,7 +227,7 @@ func UpdateOrganizationUser(c *gin.Context) { } func CreateDepartmentMember(c *gin.Context) { - params := api.CreateDepartmentMemberReq{} + params := api.CreateDepartmentMemberReq{UserInDepartment: &open_im_sdk.UserInDepartment{}} 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()})