#1427 Método rest para comprobar estado de backend
gitea/salix/master This commit looks good
Details
gitea/salix/master This commit looks good
Details
This commit is contained in:
parent
307cffcb58
commit
484ba30137
|
@ -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