mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 21:22:16 +08:00
fix: err
This commit is contained in:
parent
d4389788f7
commit
617b3a55a9
@ -260,7 +260,7 @@ func (cm *ConfigManager) restart(c *gin.Context) {
|
||||
|
||||
func (cm *ConfigManager) SetEnableConfigManager(c *gin.Context) {
|
||||
if cm.config.Discovery.Enable != config.ETCD {
|
||||
apiresp.GinError(c, errs.New("only etcd support set config").Wrap())
|
||||
apiresp.GinError(c, errs.New("only etcd support config manager").Wrap())
|
||||
return
|
||||
}
|
||||
var req apistruct.SetEnableConfigManagerReq
|
||||
|
||||
@ -53,8 +53,6 @@ func prommetricsGin() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
func newGinRouter(ctx context.Context, client discovery.SvcDiscoveryRegistry, cfg *Config) (*gin.Engine, error) {
|
||||
//client.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
// grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, "round_robin")))
|
||||
authConn, err := client.GetConn(ctx, cfg.Discovery.RpcService.Auth)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@ -124,7 +124,7 @@ func (s *authServer) GetUserToken(ctx context.Context, req *pbauth.GetUserTokenR
|
||||
return nil, err
|
||||
}
|
||||
if user.AppMangerLevel >= constant.AppNotificationAdmin {
|
||||
return nil, errs.New("app account can`t get token").Wrap()
|
||||
return nil, errs.ErrArgs.WrapMsg("app account can`t get token")
|
||||
}
|
||||
token, err := s.authDatabase.CreateToken(ctx, req.UserID, int(req.PlatformID))
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user