c2-mongoose 2.1.11 → 2.1.12
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
|
@@ -237,7 +237,7 @@ var SearchFlow = /** @class */ (function () {
|
|
|
237
237
|
};
|
|
238
238
|
SearchFlow.prototype.buildDefaultFilters = function (objectSearch) {
|
|
239
239
|
var filters = { $and: [] };
|
|
240
|
-
Object.entries(objectSearch).forEach(function (_a) {
|
|
240
|
+
Object.entries(objectSearch.model).forEach(function (_a) {
|
|
241
241
|
var key = _a[0], value = _a[1];
|
|
242
242
|
if ((0, Utils_1.isNotEmpty)(value)) {
|
|
243
243
|
var condition = {};
|
|
@@ -271,9 +271,9 @@ var SearchFlow = /** @class */ (function () {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
|
-
if (
|
|
275
|
-
|
|
276
|
-
}
|
|
274
|
+
// if (isNotEmpty(objectSearch.model)) {
|
|
275
|
+
// this.addFilterModel(objectSearch.model, filters)
|
|
276
|
+
// }
|
|
277
277
|
if (filters.$and.length === 0)
|
|
278
278
|
delete filters['$and'];
|
|
279
279
|
return filters;
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -162,7 +162,7 @@ abstract class SearchFlow {
|
|
|
162
162
|
|
|
163
163
|
public buildDefaultFilters(objectSearch: any) {
|
|
164
164
|
let filters = { $and: [] } as any
|
|
165
|
-
Object.entries(objectSearch).forEach(([key, value]) => {
|
|
165
|
+
Object.entries(objectSearch.model).forEach(([key, value]) => {
|
|
166
166
|
if (isNotEmpty(value)) {
|
|
167
167
|
let condition = {} as any
|
|
168
168
|
if (['order', 'orderBy', 'properties', 'populate', 'page', 'limit', 'model', 'select', 'searchText', 'isPageable', 'searchPageable'].includes(key)) {
|
|
@@ -202,9 +202,9 @@ abstract class SearchFlow {
|
|
|
202
202
|
})
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
if (isNotEmpty(objectSearch.model)) {
|
|
206
|
-
|
|
207
|
-
}
|
|
205
|
+
// if (isNotEmpty(objectSearch.model)) {
|
|
206
|
+
// this.addFilterModel(objectSearch.model, filters)
|
|
207
|
+
// }
|
|
208
208
|
|
|
209
209
|
if (filters.$and.length === 0)
|
|
210
210
|
delete filters['$and']
|