Merge pull request 'by Robin at 20240512' (#427) from feat-IRONFANS-114-Robin into main

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/427
This commit is contained in:
chenhao 2024-05-12 16:16:43 +08:00
commit 5ffd2d6085
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