|
@@ -169,26 +169,6 @@ class MatchSmallGroupScheduleService extends CrudService {
|
|
|
|
|
|
return d;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- resetPopulate(schema) {
|
|
|
- const arr = [];
|
|
|
- for (const key in schema) {
|
|
|
- const e = schema[key];
|
|
|
- const { ref, refPath } = e;
|
|
|
- if (!ref && !refPath) continue;
|
|
|
- const refValue = ref || refPath;
|
|
|
- const obj = { path: key };
|
|
|
- const modelPath = this.formatModelPath(refValue);
|
|
|
- const model = this.getModel(modelPath);
|
|
|
- obj.model = model;
|
|
|
- const msch = this.getSchema(modelPath);
|
|
|
- const popu = this.resetPopulate(msch);
|
|
|
- if (popu.length > 0) obj.populate = popu;
|
|
|
- arr.push(obj);
|
|
|
- }
|
|
|
- return arr;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
module.exports = MatchSmallGroupScheduleService;
|