diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index dcc7c563..eb223878 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -364,7 +364,7 @@ func (s *Service) ApiUpdateAccount(ctx *gin.Context, req *accountproto.ApiUpdate return } - if oldAccount.GetRole() == consts.Streamer { + if oldAccount.GetRole() == consts.Streamer && req.Account.Name != nil { if err := _DefaultAccount.OpUpdateStreamerAcctName(ctx, util.DerefInt64(req.Account.Mid), util.DerefString(req.Account.Name)); err != nil { logger.Error("OpUpdateStreamerAcctName fail, req: %v, err: %v", util.ToJson(req), err) ec = errcode.ErrCodeAccountSrvFail diff --git a/app/mix/service/service.go b/app/mix/service/service.go index 17eca4c5..a2131b30 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -810,7 +810,7 @@ func (s *Service) OpUpdateAccount(ctx *gin.Context, req *accountproto.OpUpdateRe return } - if oldAccount.GetRole() == consts.Streamer { + if oldAccount.GetRole() == consts.Streamer && req.Account.Name != nil { if err := _DefaultAccount.OpUpdateStreamerAcctName(ctx, util.DerefInt64(req.Account.Mid), util.DerefString(req.Account.Name)); err != nil { logger.Error("OpUpdateStreamerAcctName fail, req: %v, err: %v", util.ToJson(req), err) ec = errcode.ErrCodeAccountSrvFail