Autenticación: errores solucionados
This commit is contained in:
parent
5cfdd51cf4
commit
ac3f7c2da0
|
@ -17,6 +17,16 @@
|
|||
},
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"created": {
|
||||
"type": "date"
|
||||
},
|
||||
"updated": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -52,11 +52,14 @@ module.exports = function(app) {
|
|||
return;
|
||||
}
|
||||
|
||||
let where = {username: user};
|
||||
let where = {id: instance.id};
|
||||
let userData = {
|
||||
id: instance.id,
|
||||
username: user,
|
||||
password: password,
|
||||
email: `${user}@verdnatura.es`
|
||||
email: instance.email,
|
||||
created: instance.created,
|
||||
updated: instance.updated
|
||||
};
|
||||
User.upsertWithWhere(where, userData, login);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,16 @@
|
|||
},
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"created": {
|
||||
"type": "date"
|
||||
},
|
||||
"updated": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
Loading…
Reference in New Issue