This commit is contained in:
parent
2fffa56d70
commit
9d367b8299
|
@ -1,20 +0,0 @@
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethod('getAddress', {
|
|
||||||
description: 'Get all activated address last year ',
|
|
||||||
accessType: 'READ',
|
|
||||||
returns: {
|
|
||||||
type: 'Object',
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/getAddress`,
|
|
||||||
verb: 'GET'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.getAddress = async() => {
|
|
||||||
const query = `CALL vn.address_getLosesLastYear()`;
|
|
||||||
const [result] = await Self.rawSql(query);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -4,5 +4,4 @@ module.exports = Self => {
|
||||||
require('../methods/collection/getSectors')(Self);
|
require('../methods/collection/getSectors')(Self);
|
||||||
require('../methods/collection/setSaleQuantity')(Self);
|
require('../methods/collection/setSaleQuantity')(Self);
|
||||||
require('../methods/collection/previousLabel')(Self);
|
require('../methods/collection/previousLabel')(Self);
|
||||||
require('../methods/collection/getAddress')(Self);
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue