This commit is contained in:
parent
98125f8974
commit
3701acd26e
|
@ -1,5 +1,5 @@
|
|||
module.exports = Self => {
|
||||
Self.remoteMethodCtx, ('getLeaves', {
|
||||
Self.remoteMethod('getLeaves', {
|
||||
description: 'Returns the nodes for a department',
|
||||
accepts: [{
|
||||
arg: 'parentId',
|
||||
|
@ -20,11 +20,10 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.getLeaves = async(ctx, parentId = null, search) => {
|
||||
Self.getLeaves = async(parentId = null, search) => {
|
||||
let [res] = await Self.rawSql(
|
||||
`CALL department_getLeaves(?, ?)`,
|
||||
[parentId, search],
|
||||
{userId: ctx.req.accessToken.userId}
|
||||
[parentId, search]
|
||||
);
|
||||
|
||||
let map = new Map();
|
||||
|
|
Loading…
Reference in New Issue