Fixed issues with GetTreeNode

This commit is contained in:
Bjarke Berg
2021-01-22 09:20:46 +01:00
parent b8ef38d287
commit 74efd7fbda

View File

@@ -55,13 +55,14 @@ namespace Umbraco.Web.BackOffice.Trees
/// <summary>
/// Gets an individual tree node
/// </summary>
/// <param name="id"></param>
/// <param name="queryStrings"></param>
/// <returns></returns>
public ActionResult<TreeNode> GetTreeNode(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))]FormCollection queryStrings)
public ActionResult<TreeNode> GetTreeNode([FromRoute]string id, [ModelBinder(typeof(HttpQueryStringModelBinder))]FormCollection queryStrings)
{
//TODO: this is currently throwing an exception when loading a member
var node = GetSingleTreeNode(id, queryStrings);
ActionResult<TreeNode> node = GetSingleTreeNode(id, queryStrings);
if (!(node.Result is null))
{
return node.Result;
}
//add the tree alias to the node since it is standalone (has no root for which this normally belongs)
node.Value.AdditionalData["treeAlias"] = TreeAlias;