#1427 Método rest para comprobar estado de backend
gitea/salix/dev This commit has test failures
Details
gitea/salix/dev This commit has test failures
Details
This commit is contained in:
parent
ed14f94fd6
commit
48da697582
|
@ -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;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
module.exports = function(Self) {
|
||||
require('../methods/application/status')(Self);
|
||||
};
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "Application",
|
||||
"base": "VnModel",
|
||||
"acls": [
|
||||
{
|
||||
"property": "status",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -46,5 +46,8 @@
|
|||
},
|
||||
"Schema": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Application": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue