Errores solucionados, modelos loopback ocultados

This commit is contained in:
Juan Ferrer Toribio 2017-05-17 21:38:02 +02:00
parent 9d4acfc64f
commit 2c7a37c4b6
4 changed files with 36 additions and 46 deletions

View File

@ -14,23 +14,18 @@
] ]
}, },
"User": { "User": {
"dataSource": "auth", "dataSource": "auth"
"public": true
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth", "dataSource": "auth"
"public": true
}, },
"ACL": { "ACL": {
"dataSource": "auth", "dataSource": "auth"
"public": true
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth", "dataSource": "auth"
"public": true
}, },
"Role": { "Role": {
"dataSource": "auth", "dataSource": "auth"
"public": true
} }
} }

View File

@ -14,58 +14,53 @@
] ]
}, },
"User": { "User": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"Client": { "Client": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"PayMethod": { "PayMethod": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"ClientObservation": { "ClientObservation": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"Address": { "Address": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"AgencyService": { "AgencyService": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"Province": { "Province": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"Country": { "Country": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"Account": { "Account": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"ContactChannel": { "ContactChannel": {
"dataSource": "vn", "dataSource": "vn"
"public": true
}, },
"Employee": { "Employee": {
"dataSource": "vn", "dataSource": "vn"
"public": true
} }
} }

View File

@ -31,11 +31,6 @@ module.exports = function (app) {
}); });
function validateToken(tokenId, cb) { function validateToken(tokenId, cb) {
if (!tokenId) {
cb(false);
return;
}
app.models.AccessToken.findById(tokenId, function(err, token) { app.models.AccessToken.findById(tokenId, function(err, token) {
if (token) { if (token) {
token.validate (function (err, isValid) { token.validate (function (err, isValid) {

View File

@ -14,18 +14,23 @@
] ]
}, },
"User": { "User": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"AccessToken": { "AccessToken": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"ACL": { "ACL": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"RoleMapping": { "RoleMapping": {
"dataSource": "auth" "dataSource": "auth",
"public": false
}, },
"Role": { "Role": {
"dataSource": "auth" "dataSource": "auth",
"public": false
} }
} }