Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release

This commit is contained in:
wangchuxiao 2022-09-28 15:39:19 +08:00
commit 488346979d
2 changed files with 7 additions and 7 deletions

View File

@ -503,9 +503,9 @@ type OANotificationElem struct {
Ex string `mapstructure:"ex" json:"ex"`
}
type MessageRevoked struct {
RevokerID string `mapstructure:"notificationName" json:"revokerID" validate:"required"`
RevokerRole int32 `mapstructure:"notificationName" json:"revokerRole" validate:"required"`
ClientMsgID string `mapstructure:"notificationName" json:"clientMsgID" validate:"required"`
RevokerNickname string `mapstructure:"notificationName" json:"revokerNickname"`
SessionType int32 `mapstructure:"notificationName" json:"sessionType" validate:"required"`
RevokerID string `mapstructure:"revokerID" json:"revokerID" validate:"required"`
RevokerRole int32 `mapstructure:"revokerRole" json:"revokerRole" validate:"required"`
ClientMsgID string `mapstructure:"clientMsgID" json:"clientMsgID" validate:"required"`
RevokerNickname string `mapstructure:"revokerNickname" json:"revokerNickname"`
SessionType int32 `mapstructure:"sessionType" json:"sessionType" validate:"required"`
}

View File

@ -80,7 +80,7 @@ func DelSuperGroupMsg(c *gin.Context) {
)
rpcReq := &rpc.DelSuperGroupMsgReq{}
if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
utils.CopyStructFields(rpcReq, &req)
@ -91,7 +91,7 @@ func DelSuperGroupMsg(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + rpcReq.OpUserID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
c.JSON(http.StatusOK, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
options := make(map[string]bool, 5)