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.
- package/lib/models/User.js +4 -1
- package/lib/services/auth.js +0 -2
- package/lib/services/user.js +0 -1
- package/package.json +1 -1
package/lib/models/User.js
CHANGED
|
@@ -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: {
|
|
25
|
+
data: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: { changePwd: false }
|
|
28
|
+
},
|
|
26
29
|
validateKey: {
|
|
27
30
|
limitCodeTime: { type: Number },
|
|
28
31
|
resetPassword: {
|
package/lib/services/auth.js
CHANGED
|
@@ -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})
|
package/lib/services/user.js
CHANGED