aloux-iam 0.0.70 → 0.0.72

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.
@@ -578,8 +578,6 @@ self.createCustomer = async (req, res) => {
578
578
  user.status = req.body?.status ? req.body?.status : 'Activo'
579
579
  let fun
580
580
  if(req.body?.assignedRole){
581
- fun = await Function.findOne({ name: process.env.FUNCTION_NAME },{ name: 1 }).lean()
582
- }else{
583
581
  fun = await Function.findOne({ _id: req.body?.assignedRole },{ name: 1 }).lean()
584
582
  if(fun?.name === 'Propietario'){
585
583
  throw {
@@ -590,6 +588,8 @@ self.createCustomer = async (req, res) => {
590
588
  error: new Error()
591
589
  }
592
590
  }
591
+ }else{
592
+ fun = await Function.findOne({ name: process.env.FUNCTION_NAME },{ name: 1 }).lean()
593
593
  }
594
594
  user._functions.push(fun._id)
595
595
  delete user.pwd
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloux-iam",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "description": "Aloux IAM for APIs ",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,7 +26,6 @@
26
26
  "@google-cloud/bigquery-storage": "^4.2.1",
27
27
  "@google-cloud/storage": "^5.7.0",
28
28
  "bcryptjs": "^2.4.3",
29
- "body-parser": "~1.19.0",
30
29
  "cookie-parser": "^1.4.6",
31
30
  "dayjs": "^1.11.9",
32
31
  "express": "^4.19.2",