c2-mongoose 2.1.86 → 2.1.88

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.
@@ -420,6 +420,12 @@ var SearchFlow = /** @class */ (function () {
420
420
  if (['projection', 'pageable', 'order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
421
421
  return;
422
422
  }
423
+ if (value instanceof mongoose_1.Types.ObjectId) {
424
+ console.log(value, "objectiId");
425
+ }
426
+ if (mongoose_1.Types.ObjectId.isValid(value)) {
427
+ console.log(value, "objectiId");
428
+ }
423
429
  if (key.endsWith("_id")) {
424
430
  value = new mongoose_1.Types.ObjectId(value);
425
431
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.86",
3
+ "version": "2.1.88",
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",
@@ -311,6 +311,12 @@ abstract class SearchFlow {
311
311
  return
312
312
  }
313
313
 
314
+ if (value instanceof Types.ObjectId) {
315
+ console.log(value, "objectiId")
316
+ }
317
+ if (Types.ObjectId.isValid(value as any)) {
318
+ console.log(value, "objectiId");
319
+ }
314
320
  if (key.endsWith("_id")) {
315
321
  value = new Types.ObjectId(value as string)
316
322
  }