Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
feat: Change menu structure. (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt authored Sep 11, 2023
1 parent d835919 commit a462e23
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/modules/adempiere-api/api/extensions/adempiere/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************************
* Copyright (C) 2018-2023 E.R.P. Consultores y Asociados, C.A. *
* Copyright (C) 2018-present E.R.P. Consultores y Asociados, C.A. *
* Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -40,7 +40,7 @@ function getMenu (menu) {
action: menu.getAction(),
reference_id: menu.getReferenceId(),
reference_uuid: menu.getReferenceUuid(),
childs: menu.getChildsList().map(child => {
children: menu.getChildsList().map(child => {
return getMenu(child);
}),
is_active: menu.getIsActive()
Expand Down Expand Up @@ -154,7 +154,11 @@ module.exports = ({ config }: ExtensionAPIFunctionParameter) => {
if (response) {
res.json({
code: 200,
result: getMenu(response)
result: {
menus: response.getChildsList().map(child => {
return getMenu(child);
})
}
});
} else if (err) {
res.json({
Expand Down

0 comments on commit a462e23

Please sign in to comment.