c2-mongoose 2.1.1 → 2.1.2
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
|
@@ -95,7 +95,8 @@ var SearchFlow = /** @class */ (function () {
|
|
|
95
95
|
if ((0, Utils_1.isEmpty)(this.populate)) {
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
var
|
|
98
|
+
var populateStr = this.populate;
|
|
99
|
+
var propertiesArray = populateStr.split(',');
|
|
99
100
|
var populates = [];
|
|
100
101
|
for (var _i = 0, propertiesArray_1 = propertiesArray; _i < propertiesArray_1.length; _i++) {
|
|
101
102
|
var property = propertiesArray_1[_i];
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -10,7 +10,7 @@ abstract class SearchFlow {
|
|
|
10
10
|
page: number
|
|
11
11
|
limit: number
|
|
12
12
|
select: string
|
|
13
|
-
populate:
|
|
13
|
+
populate: any
|
|
14
14
|
filters: any
|
|
15
15
|
|
|
16
16
|
constructor(params: any) {
|
|
@@ -27,8 +27,10 @@ abstract class SearchFlow {
|
|
|
27
27
|
public buildPopulate(): any {
|
|
28
28
|
if (isEmpty(this.populate)) {
|
|
29
29
|
return
|
|
30
|
-
}
|
|
31
|
-
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var populateStr = this.populate as string
|
|
33
|
+
var propertiesArray = populateStr.split(',')
|
|
32
34
|
var populates = [] as any
|
|
33
35
|
for (var property of propertiesArray) {
|
|
34
36
|
let [first, ...rest] = property.split('.')
|