bruce-models 1.3.8 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1535,7 +1535,9 @@
1535
1535
  try {
1536
1536
  const data = yield req;
1537
1537
  const item = data.Items.find(x => x.Bruce.ID == entityId);
1538
- res(item);
1538
+ res({
1539
+ entity: item
1540
+ });
1539
1541
  }
1540
1542
  catch (e) {
1541
1543
  // No showing error as we don't want to see it 2000 times.
@@ -1547,7 +1549,7 @@
1547
1549
  }
1548
1550
  }
1549
1551
  return {
1550
- entities: (yield Promise.all(reqs)).filter(x => !!x)
1552
+ entities: (yield Promise.all(reqs)).map(x => x === null || x === void 0 ? void 0 : x.entity).filter(x => !!x)
1551
1553
  };
1552
1554
  });
1553
1555
  }
@@ -1719,7 +1721,9 @@
1719
1721
  for (let i = 0; i < entities.length; i++) {
1720
1722
  const entity = entities[i];
1721
1723
  const id = entity.Bruce.ID;
1722
- api.Cache.Set(GetCacheKey(id), entity, exports.Api.DEFAULT_CACHE_DURATION);
1724
+ api.Cache.Set(GetCacheKey(id), {
1725
+ entity: entity
1726
+ }, exports.Api.DEFAULT_CACHE_DURATION);
1723
1727
  }
1724
1728
  return {
1725
1729
  entities: entities