fix: 游戏创建与打手详情接口未返回数据
AddGamesResp 加 Games 字段,创建后查询回填。Game.Id 加 optional 避免请求解析时要求传 id。getPlayerLogic 初始化 resp 避免 copier 写入 nil 指针。补跑 ent go generate 确保 userfollows schema 与 生成代码一致。
This commit is contained in:
@@ -38,6 +38,7 @@ func (l *GetPlayerLogic) GetPlayer(req *types.GetPlayerReq) (resp *types.PlayerP
|
||||
logx.Errorf("GetPlayerLogic.GetPlayers err: %v", err)
|
||||
return nil, errors.New("failed to get player details")
|
||||
}
|
||||
resp = &types.PlayerProfile{}
|
||||
err = copier.Copy(resp, &player)
|
||||
if err != nil {
|
||||
logx.Errorf("copier.Copy err: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user