mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 20:45:57 +08:00
Refactor code
This commit is contained in:
@@ -464,7 +464,7 @@ func TransferGroupOwner(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
req := &rpc.TransferGroupOwnerReq{}
|
||||
utils.CopyStructFields(req, params)
|
||||
utils.CopyStructFields(req, ¶ms)
|
||||
var ok bool
|
||||
ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"))
|
||||
if !ok {
|
||||
@@ -483,7 +483,8 @@ func TransferGroupOwner(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}
|
||||
c.JSON(http.StatusOK, resp)
|
||||
resp := api.TransferGroupOwnerResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}}
|
||||
log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user