parent
ff44166cd4
commit
4532eb1eec
|
@ -1,26 +0,0 @@
|
||||||
|
|
||||||
const packageJson = require(`${process.cwd()}/package.json`);
|
|
||||||
|
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethod('version', {
|
|
||||||
description: 'Gets all models information',
|
|
||||||
accepts: [
|
|
||||||
{
|
|
||||||
arg: 'ctx',
|
|
||||||
type: 'Object',
|
|
||||||
http: {source: 'context'}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
returns: {
|
|
||||||
type: 'Object',
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/version`,
|
|
||||||
verb: 'GET'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Self.version = async function(ctx) {
|
|
||||||
return packageJson.version;
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
module.exports = function(Self) {
|
module.exports = function(Self) {
|
||||||
require('../methods/application/status')(Self);
|
require('../methods/application/status')(Self);
|
||||||
require('../methods/application/version')(Self);
|
|
||||||
require('../methods/application/post')(Self);
|
require('../methods/application/post')(Self);
|
||||||
require('../methods/application/execute')(Self);
|
require('../methods/application/execute')(Self);
|
||||||
require('../methods/application/executeProc')(Self);
|
require('../methods/application/executeProc')(Self);
|
||||||
|
|
|
@ -8,12 +8,6 @@
|
||||||
"principalId": "$everyone",
|
"principalId": "$everyone",
|
||||||
"permission": "ALLOW"
|
"permission": "ALLOW"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"property": "version",
|
|
||||||
"principalType": "ROLE",
|
|
||||||
"principalId": "$everyone",
|
|
||||||
"permission": "ALLOW"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"property": "post",
|
"property": "post",
|
||||||
"principalType": "ROLE",
|
"principalType": "ROLE",
|
||||||
|
|
Loading…
Reference in New Issue