c2-mongoose 2.1.417 → 2.1.418

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.
@@ -62,9 +62,9 @@ var SearcherV3Flow = /** @class */ (function () {
62
62
  var _a, _b, _c, _d, _e;
63
63
  if (oneToMany === void 0) { oneToMany = []; }
64
64
  return __awaiter(this, void 0, void 0, function () {
65
- var facet, pipelineFacetPaging, pipelineFacetItems, _i, _f, _g, key, value, _h, value_1, item, mainFilters, result, ret;
66
- return __generator(this, function (_j) {
67
- switch (_j.label) {
65
+ var facet, pipelineFacetPaging, pipelineFacetItems, _i, _f, _g, key, value, mainFilters, result, ret;
66
+ return __generator(this, function (_h) {
67
+ switch (_h.label) {
68
68
  case 0:
69
69
  params.page = Number((_a = params.page) !== null && _a !== void 0 ? _a : 1);
70
70
  params.limit = Number((_b = params.limit) !== null && _b !== void 0 ? _b : 50);
@@ -95,10 +95,7 @@ var SearcherV3Flow = /** @class */ (function () {
95
95
  if (params.metadata) {
96
96
  for (_i = 0, _f = Array.from(params.metadata.entries()); _i < _f.length; _i++) {
97
97
  _g = _f[_i], key = _g[0], value = _g[1];
98
- for (_h = 0, value_1 = value; _h < value_1.length; _h++) {
99
- item = value_1[_h];
100
- facet[key] = value;
101
- }
98
+ facet[key] = value;
102
99
  }
103
100
  }
104
101
  mainFilters = params.mainFilter ? __spreadArray([], MatchFlowItem_1.default.execute(params.mainFilter, model), true) : [];
@@ -113,7 +110,7 @@ var SearcherV3Flow = /** @class */ (function () {
113
110
  }
114
111
  }).read('secondaryPreferred')];
115
112
  case 1:
116
- result = _j.sent();
113
+ result = _h.sent();
117
114
  ret = {};
118
115
  ret.items = result[0].items;
119
116
  if (params.pageable !== false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.417",
3
+ "version": "2.1.418",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -61,9 +61,7 @@ class SearcherV3Flow {
61
61
 
62
62
  if (params.metadata) {
63
63
  for (const [key, value] of Array.from(params.metadata.entries())) {
64
- for (const item of value) {
65
- facet[key] = value
66
- }
64
+ facet[key] = value
67
65
  }
68
66
  }
69
67