pull/351/head
wangchuxiao 3 years ago
parent 066eeb6ba6
commit 94ed160eee

@ -11,13 +11,15 @@ import (
pbCommon "Open_IM/pkg/proto/sdk_ws" pbCommon "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"net/http" "net/http"
"strings" "strings"
"github.com/gin-gonic/gin" "github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
url2 "net/url" url2 "net/url"
"github.com/gin-gonic/gin"
) )
var ( var (
@ -100,7 +102,7 @@ func AddUserRegisterAddFriendIDList(c *gin.Context) {
return return
} }
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID) etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
if etcdConn == nil { if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil" errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg) log.NewError(req.OperationID, errMsg)
@ -128,7 +130,7 @@ func ReduceUserRegisterAddFriendIDList(c *gin.Context) {
return return
} }
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID) etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
if etcdConn == nil { if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil" errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg) log.NewError(req.OperationID, errMsg)
@ -156,7 +158,7 @@ func GetUserRegisterAddFriendIDList(c *gin.Context) {
return return
} }
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID) etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, req.OperationID)
if etcdConn == nil { if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil" errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg) log.NewError(req.OperationID, errMsg)

Loading…
Cancel
Save