diff --git a/src/models/menu_tree.rs b/src/models/menu_tree.rs index a982d11..403bfc5 100644 --- a/src/models/menu_tree.rs +++ b/src/models/menu_tree.rs @@ -34,6 +34,7 @@ pub struct MenuTree { pub uuid: Option, pub id: Option, pub internal_id: Option, + pub name: Option, pub node_id: Option, pub parent_id: Option, pub sequence: Option, @@ -53,6 +54,7 @@ impl Default for MenuTree { uuid: None, id: None, internal_id: None, + name: None, node_id: None, parent_id: None, sequence: None, @@ -153,7 +155,7 @@ pub async fn menu_tree_from_id(_id: Option, _dictionary_code: Option<&St log::info!("Finded Menu Tree Value: {:?}", menu.id); // sort menu children nodes by sequence if let Some(ref mut children) = menu.children { - children.sort_by_key(|child| child.sequence.clone().unwrap_or(0)); + children.sort_by_key(|child: &MenuTree| child.sequence.clone().unwrap_or(0)); } Ok(menu) },