fix teams

This commit is contained in:
2026-09-13 13:05:05 +07:00
parent 03761777de
commit 19253dc6d4
2 changed files with 2 additions and 1 deletions
+2 -1
View File
@@ -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, "не удалось обновить карту")
}