diff --git a/app/controllers/api/v1/Menu.controller.js b/app/controllers/api/v1/Menu.controller.js index b7e8daf..2509eee 100644 --- a/app/controllers/api/v1/Menu.controller.js +++ b/app/controllers/api/v1/Menu.controller.js @@ -11,9 +11,21 @@ class Menu extends Controller { } async get_items(req, res) { + // Build the "My Tree" option const root_page = await req.user.get_root_page() const nodes = await this._build_menu_object(root_page) - return res.api(nodes) + const menu = [] + + menu.push({ + id: 0, + name: 'My Info Tree', + children: nodes, + noDelete: true, + virtual: true, + expanded: true, + }) + + return res.api(menu) } async _build_menu_object(parent_node, arr= []) {