aloux-iam 0.0.14 → 0.0.15

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.
@@ -57,7 +57,7 @@ self.get = async (req, res) => {
57
57
  try {
58
58
  const _id = req.params.USER_ID
59
59
 
60
- const user = await User.findOne({ _id }, { pwd: 0 }).populate({ path: "_functions" }).select("-pwd -tokens").lean()
60
+ const user = await User.findOne({ _id }, { pwd: 0 }).populate([{ path: "_functions" },{ path: "_business" }, { path: "_client" }]).select("-pwd -tokens").lean()
61
61
 
62
62
  if (!user)
63
63
  res.status(404).send()
@@ -40,7 +40,12 @@ const adminSchema = mongoose.Schema({
40
40
  ],
41
41
  _business: [
42
42
  {
43
- type: ObjectId, required: false, ref: 'Business'
43
+ type: ObjectId, ref: 'Business'
44
+ }
45
+ ],
46
+ _client: [
47
+ {
48
+ type: ObjectId, ref: 'Client'
44
49
  }
45
50
  ],
46
51
  tokens: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloux-iam",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Aloux IAM for APIs ",
5
5
  "main": "index.js",
6
6
  "scripts": {