fix add team

This commit is contained in:
2026-07-29 00:59:37 +07:00
parent 1b3e0b768d
commit d1b263fa78
6 changed files with 46 additions and 10 deletions
+5 -2
View File
@@ -545,7 +545,7 @@ func (s *server) AddTeam(ctx context.Context, req *proto.AddTeamReq) (*proto.Add
return nil, status.Errorf(codes.PermissionDenied, "permission denied")
}
err := s.gameService.AddTeam(
team, err := s.gameService.AddTeam(
ctx,
claims.UserID,
int(req.GameId),
@@ -557,7 +557,10 @@ func (s *server) AddTeam(ctx context.Context, req *proto.AddTeamReq) (*proto.Add
}, nil
}
return &proto.AddTeamRsp{}, nil
return &proto.AddTeamRsp{
Id: int32(team.ID),
Password: team.Password,
}, nil
}
func (s *server) UpdateTeam(ctx context.Context, req *proto.UpdateTeamReq) (*proto.UpdateTeamRsp, error) {