mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 19:22:46 +08:00
Merge branch 'tuoyun' of github.com:OpenIMSDK/Open-IM-Server into tuoyun
This commit is contained in:
commit
cef208f6ef
@ -35,10 +35,16 @@ func UserRegister(c *gin.Context) {
|
|||||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName)
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName)
|
||||||
client := rpc.NewAuthClient(etcdConn)
|
client := rpc.NewAuthClient(etcdConn)
|
||||||
reply, err := client.UserRegister(context.Background(), req)
|
reply, err := client.UserRegister(context.Background(), req)
|
||||||
if err != nil || reply.CommonResp.ErrCode != 0 {
|
if err != nil {
|
||||||
log.NewError(req.OperationID, "UserRegister failed ", err, reply.CommonResp.ErrCode)
|
log.NewError(req.OperationID, "call rpc err ", err)
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "internal service err"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if reply.CommonResp.ErrCode != 0 {
|
||||||
|
log.NewError(req.OperationID, "UserRegister failed ", err)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg})
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg})
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pbDataToken := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID}
|
pbDataToken := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user