c2-mongoose 2.1.34 → 2.1.35

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.
@@ -258,14 +258,14 @@ var SearchFlow = /** @class */ (function () {
258
258
  momentValue.hour(0);
259
259
  momentValue.minute(0);
260
260
  momentValue.second(0);
261
- condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $gte: momentValue.toDate() });
261
+ condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $gte: momentValue.format("YYYY-MM-DD HH:mm") });
262
262
  }
263
263
  if ((0, Utils_1.isNotEmpty)(values[1])) {
264
264
  var momentValue = (0, moment_1.default)(values[1]);
265
265
  momentValue.hour(23);
266
266
  momentValue.minute(59);
267
267
  momentValue.second(59);
268
- condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $lte: momentValue.toDate() });
268
+ condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $lte: momentValue.format("YYYY-MM-DD HH:mm") });
269
269
  }
270
270
  filters.$and.push(condition);
271
271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.34",
3
+ "version": "2.1.35",
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",
@@ -176,7 +176,7 @@ abstract class SearchFlow {
176
176
  momentValue.second(0)
177
177
  condition[fieldName] = {
178
178
  ...condition[fieldName],
179
- $gte: momentValue.toDate()
179
+ $gte: momentValue.format("YYYY-MM-DD HH:mm")
180
180
  }
181
181
  }
182
182
 
@@ -187,7 +187,7 @@ abstract class SearchFlow {
187
187
  momentValue.second(59)
188
188
  condition[fieldName] = {
189
189
  ...condition[fieldName],
190
- $lte: momentValue.toDate()
190
+ $lte: momentValue.format("YYYY-MM-DD HH:mm")
191
191
  }
192
192
  }
193
193
  filters.$and.push(condition)