Fixes #U4-2104 - namespace issue with UmbracoApiControllers

This commit is contained in:
Shannon Deminick
2013-04-15 21:44:26 +06:00
parent da53ffe9f2
commit 1e7e670df3
2 changed files with 2 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ namespace Umbraco.Web.Mvc
controllerPluginRoute.DataTokens = new RouteValueDictionary();
}
//look in this namespace to create the controller
controllerPluginRoute.DataTokens.Add("Namespaces", controllerType.Namespace);
controllerPluginRoute.DataTokens.Add("Namespaces", new[] {controllerType.Namespace});
}
//constraints: only match controllers ending with 'controllerSuffixName' and only match this controller's ID for this route

View File

@@ -209,7 +209,7 @@ namespace Umbraco.Web
{
route.DataTokens = new RouteValueDictionary();
}
route.DataTokens.Add("Namespaces", meta.ControllerNamespace); //look in this namespace to create the controller
route.DataTokens.Add("Namespaces", new[] {meta.ControllerNamespace}); //look in this namespace to create the controller
route.DataTokens.Add("umbraco", "api"); //ensure the umbraco token is set
}