by Robin at 20240512

This commit is contained in:
Leufolium 2024-05-12 16:16:14 +08:00
parent 06227bd983
commit 5cf69a9244
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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