c2-mongoose 2.1.141 → 2.1.142
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
|
@@ -76,13 +76,7 @@ var SearchFlow = /** @class */ (function () {
|
|
|
76
76
|
var field = _a[_i];
|
|
77
77
|
var include = field.startsWith("-") ? false : true;
|
|
78
78
|
field = field.replace("-", "");
|
|
79
|
-
projection = __assign(__assign({}, projection), this.buildProjectionNested(
|
|
80
|
-
// if (field.startsWith("-")) {
|
|
81
|
-
// field = field.substring(1)
|
|
82
|
-
// projection[field] = 0;
|
|
83
|
-
// } else {
|
|
84
|
-
// projection[field] = 1;
|
|
85
|
-
// }
|
|
79
|
+
projection = __assign(__assign({}, projection), this.buildProjectionNested(projection, field, include));
|
|
86
80
|
}
|
|
87
81
|
return projection;
|
|
88
82
|
};
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -41,14 +41,8 @@ abstract class SearchFlow {
|
|
|
41
41
|
field = field.replace("-", "")
|
|
42
42
|
projection = {
|
|
43
43
|
...projection,
|
|
44
|
-
...this.buildProjectionNested(
|
|
44
|
+
...this.buildProjectionNested(projection, field, include)
|
|
45
45
|
}
|
|
46
|
-
// if (field.startsWith("-")) {
|
|
47
|
-
// field = field.substring(1)
|
|
48
|
-
// projection[field] = 0;
|
|
49
|
-
// } else {
|
|
50
|
-
// projection[field] = 1;
|
|
51
|
-
// }
|
|
52
46
|
|
|
53
47
|
}
|
|
54
48
|
return projection;
|