Fixes #U4-2104 - namespace issue with UmbracoApiControllers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user