c2-mongoose 2.1.88 → 2.1.90
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.
package/dist/flow/SearchFlow.js
CHANGED
|
@@ -420,13 +420,7 @@ 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
|
|
424
|
-
console.log(value, "objectiId");
|
|
425
|
-
}
|
|
426
|
-
if (mongoose_1.Types.ObjectId.isValid(value)) {
|
|
427
|
-
console.log(value, "objectiId");
|
|
428
|
-
}
|
|
429
|
-
if (key.endsWith("_id")) {
|
|
423
|
+
if (typeof value === 'string' && mongoose_1.Types.ObjectId.isValid(value)) {
|
|
430
424
|
value = new mongoose_1.Types.ObjectId(value);
|
|
431
425
|
}
|
|
432
426
|
if (value === 'true') {
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -311,13 +311,7 @@ abstract class SearchFlow {
|
|
|
311
311
|
return
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
if (value
|
|
315
|
-
console.log(value, "objectiId")
|
|
316
|
-
}
|
|
317
|
-
if (Types.ObjectId.isValid(value as any)) {
|
|
318
|
-
console.log(value, "objectiId");
|
|
319
|
-
}
|
|
320
|
-
if (key.endsWith("_id")) {
|
|
314
|
+
if (typeof value === 'string' && Types.ObjectId.isValid(value as any)) {
|
|
321
315
|
value = new Types.ObjectId(value as string)
|
|
322
316
|
}
|
|
323
317
|
|