generated from VLADIMIR/template
fix teams
This commit is contained in:
Binary file not shown.
@@ -230,7 +230,8 @@ func (s *server) GetGameMap(ctx context.Context, req *proto.GetGameMapReq) (*pro
|
||||
}
|
||||
result := make([]*proto.MapItem, 0, len(items))
|
||||
for _, item := range items {
|
||||
if item.Kind == "screen" && screenStates[item.ItemID] == nil {
|
||||
_, teamExists := teamNames[item.ItemID]
|
||||
if (item.Kind == "team" && !teamExists) || (item.Kind == "screen" && screenStates[item.ItemID] == nil) {
|
||||
if err := s.mapRepo.Delete(ctx, item); err != nil {
|
||||
return nil, status.Error(codes.Internal, "не удалось обновить карту")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user