generated from VLADIMIR/template
add
This commit is contained in:
@@ -203,6 +203,9 @@ func (s *server) GetGameMap(ctx context.Context, req *proto.GetGameMapReq) (*pro
|
||||
return nil, status.Error(codes.NotFound, "игра не найдена")
|
||||
}
|
||||
for _, team := range game.Teams {
|
||||
if team.ParticipationStatus == "cancelled" {
|
||||
continue
|
||||
}
|
||||
if err := s.mapRepo.Ensure(ctx, int(req.GameId), "team", team.ID); err != nil {
|
||||
return nil, status.Error(codes.Internal, "не удалось сохранить карту")
|
||||
}
|
||||
@@ -222,6 +225,9 @@ func (s *server) GetGameMap(ctx context.Context, req *proto.GetGameMapReq) (*pro
|
||||
}
|
||||
teamNames := map[int]string{}
|
||||
for _, team := range game.Teams {
|
||||
if team.ParticipationStatus == "cancelled" {
|
||||
continue
|
||||
}
|
||||
teamNames[team.ID] = team.Name
|
||||
}
|
||||
screenStates := map[int]*proto.ScreenState{}
|
||||
|
||||
Reference in New Issue
Block a user