@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 3.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e5fb9b3: release changes in user api
8
+
3
9
  ## 3.16.0
4
10
 
5
11
  ### Minor Changes
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) {