#1427 Método rest para comprobar estado de backend
gitea/salix/dev This commit has test failures Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-05-15 11:53:57 +02:00
parent ed14f94fd6
commit 48da697582
4 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,19 @@
module.exports = Self => {
Self.remoteMethod('status', {
description: 'Gets the backend status',
returns: {
type: 'Object',
root: true
},
http: {
path: `/status`,
verb: 'GET'
}
});
Self.status = async() => {
await Self.rawSql(`SELECT TRUE`);
return true;
};
};

View File

@ -0,0 +1,4 @@
module.exports = function(Self) {
require('../methods/application/status')(Self);
};

View File

@ -0,0 +1,12 @@
{
"name": "Application",
"base": "VnModel",
"acls": [
{
"property": "status",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}

View File

@ -46,5 +46,8 @@
},
"Schema": {
"dataSource": "vn"
},
"Application": {
"dataSource": "vn"
}
}