organization

pull/218/head
skiffer-git 3 years ago
parent eb630b23ae
commit b6e06dfdc2

@ -299,14 +299,14 @@ func GetUserInDepartment(c *gin.Context) {
}
func UpdateUserInDepartment(c *gin.Context) {
params := api.UpdateUserInDepartmentReq{}
params := api.UpdateUserInDepartmentReq{DepartmentMember: &open_im_sdk.DepartmentMember{}}
if err := c.BindJSON(&params); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
req := &rpc.UpdateUserInDepartmentReq{}
req := &rpc.UpdateUserInDepartmentReq{DepartmentMember: &open_im_sdk.DepartmentMember{}}
utils.CopyStructFields(req, &params)
err, opUserID := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)

@ -75,8 +75,8 @@ type GetUserInDepartmentResp struct {
}
type UpdateUserInDepartmentReq struct {
OperationID string `json:"operationID" binding:"required"`
UserInDepartment *open_im_sdk.UserInDepartment
OperationID string `json:"operationID" binding:"required"`
*open_im_sdk.DepartmentMember
}
type UpdateUserInDepartmentResp struct {
CommResp

Loading…
Cancel
Save