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