aloux-iam 0.0.77 → 0.0.78

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.
@@ -22,7 +22,10 @@ const adminSchema = mongoose.Schema({
22
22
  regionCode: { type: String, trim: true, maxLength: 10 }
23
23
  },
24
24
  urlImg: { type: String },
25
- data: { type: Object },
25
+ data: {
26
+ type: Object,
27
+ default: { changePwd: false }
28
+ },
26
29
  validateKey: {
27
30
  limitCodeTime: { type: Number },
28
31
  resetPassword: {
@@ -97,7 +97,6 @@ self.login = async (body, res) => {
97
97
  const token = await userLogin.generateAuthToken()
98
98
  let changePwd
99
99
  if(!userLogin?.data){
100
- userLogin.data = {}
101
100
  userLogin.data.changePwd = false
102
101
  changePwd= false
103
102
  await userLogin.save()
@@ -608,7 +607,6 @@ self.createCustomer = async (req, res) => {
608
607
  }
609
608
  user._functions.push(fun._id)
610
609
  delete user.pwd
611
- user.data = {}
612
610
  user.data.changePwd = false
613
611
  let newCustomer = await user.save()
614
612
  await UserProvisional.deleteOne({email: newCustomer.email})
@@ -21,7 +21,6 @@ self.create = async (body) => {
21
21
  user.status = body?.status ? body?.status : 'Activo'
22
22
 
23
23
  delete user.pwd
24
- user.data = {}
25
24
  user.data.changePwd = false
26
25
  await user.save()
27
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloux-iam",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "description": "Aloux IAM for APIs ",
5
5
  "main": "index.js",
6
6
  "scripts": {