@7365admin1/core 3.16.0 → 3.17.0
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/CHANGELOG.md +6 -0
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -8797,7 +8797,22 @@ function useUserRepo() {
|
|
|
8797
8797
|
as: "unitInfo"
|
|
8798
8798
|
}
|
|
8799
8799
|
},
|
|
8800
|
-
{ $unwind: { path: "$unitInfo", preserveNullAndEmptyArrays: true } }
|
|
8800
|
+
{ $unwind: { path: "$unitInfo", preserveNullAndEmptyArrays: true } },
|
|
8801
|
+
{
|
|
8802
|
+
$lookup: {
|
|
8803
|
+
from: "sites",
|
|
8804
|
+
localField: "site",
|
|
8805
|
+
foreignField: "_id",
|
|
8806
|
+
pipeline: [{ $project: { _id: 0, category: 1 } }],
|
|
8807
|
+
as: "siteInfo"
|
|
8808
|
+
}
|
|
8809
|
+
},
|
|
8810
|
+
{
|
|
8811
|
+
$addFields: {
|
|
8812
|
+
siteCategory: { $first: "$siteInfo.category" }
|
|
8813
|
+
}
|
|
8814
|
+
},
|
|
8815
|
+
{ $project: { siteInfo: 0 } }
|
|
8801
8816
|
]).toArray();
|
|
8802
8817
|
const data = results.length > 0 ? results[0] : null;
|
|
8803
8818
|
if (!data) {
|