mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix bug
This commit is contained in:
parent
b0d8fe5c3d
commit
a8cd3129e7
@ -14,6 +14,7 @@ import (
|
|||||||
"Open_IM/pkg/utils"
|
"Open_IM/pkg/utils"
|
||||||
"context"
|
"context"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/golang/protobuf/ptypes/wrappers"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@ -97,8 +98,6 @@ func GetUsersInfo(c *gin.Context) {
|
|||||||
|
|
||||||
func UpdateUserInfo(c *gin.Context) {
|
func UpdateUserInfo(c *gin.Context) {
|
||||||
params := api.UpdateSelfUserInfoReq{}
|
params := api.UpdateSelfUserInfoReq{}
|
||||||
var t int32
|
|
||||||
params.GlobalRecvMsgOpt = &t
|
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
log.NewError("0", "BindJSON failed ", err.Error())
|
log.NewError("0", "BindJSON failed ", err.Error())
|
||||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||||
@ -117,7 +116,7 @@ func UpdateUserInfo(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String())
|
log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String())
|
||||||
if params.GlobalRecvMsgOpt != nil {
|
if params.GlobalRecvMsgOpt != nil {
|
||||||
req.GlobalRecvMsgOpt.Value = *params.GlobalRecvMsgOpt
|
req.GlobalRecvMsgOpt = &wrappers.Int32Value{Value: *params.GlobalRecvMsgOpt}
|
||||||
}
|
}
|
||||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||||
client := rpc.NewUserClient(etcdConn)
|
client := rpc.NewUserClient(etcdConn)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user