refs #5334 error getLeaves solve
gitea/salix/pipeline/head Build queued... Details

This commit is contained in:
Carlos Satorres 2023-06-19 13:48:14 +02:00
parent 98125f8974
commit 3701acd26e
1 changed files with 3 additions and 4 deletions

View File

@ -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();